Skip to main content

Unzip file using C#

unzip

Extracting the content of a ZIP file is really common. And here is a simple example of how to do it with C# using ZipFile and SharpZipLib. If you are using .Net Framework 4.6.0 or up you can use System.IO.Compression.ZipFile from Microsoft. But if you are lower than 4.6 then you can use SharpZipLib from […]

C# – FTP With ComponentPro

FTP

ComponentPro is a professional suite of libraries for FTP, sFTP and document manipulations (Word, Excel, PDF, …). Here is a simple example of how to use it with (s)FTP.

How to use Font Icons

font-awesome

What is the issue with images? The problem with images is that if you try to zoom in, the quality starts to be really bad (ugly pixels) without even talking about the size of it. The best way to display nice icons in your app or website is to use Font Icons. Like that you […]

UWP – How to get the close app event

close-event

Basically, what we want here is to be able to catch the close event of our UWP app. We could go further and ask the users if they want to save their changes before the Exit. In the App.xaml.cs: Here, it is important to put the CloseRequested event before the Activate of the View. Then, add the code for […]

C# – MongoDB

mongodb-logo

Here is a simple example of how to use MongoDB with C#. What is MongoDB? MongoDB is a cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with schema. How to use the MongoDB? Because MongoDB has to run on a server, you then have two options: install it or […]

WPF – ProgressBar

WPF - ProgressBar

In this simple example, we will see how to create and manipulate the ProgressBar control from WPF in a MVVM way. Let’s start with the View in XAML: And now the ViewModel: Happy coding! 🙂

MongoDB Realm – Simple example

MongoDB Realm database

Here is a simple example on how to use MongoDB Realm with C#. What is MongoDB Realm? MongoDB Realm will combine Realm, the popular mobile database and data synchronization technology, and MongoDB Stitch, the serverless platform for MongoDB, into a unified solution that makes it easy for you to build powerful and engaging experiences on […]

C# – Custom Attribute

Custom attribute

In this article, we will see together how to create our own custom attribute with C#, and then get the value of it thanks to reflection through a simple example. What is an Attribute? An attribute is basically a metadata object used to provide declarative information to a class, property, enum, … You can retrieve […]

C# – Moq tutorial for beginners

Unit Testing with MOQ

What is Unit Testing? Unit Testing is a very important part of coding. It consumes time and efforts, but it worth it. Thanks to Unit Testing you will feel more confident and you will know that your code is working. Of course testing everything is almost impossible, but at least the normal cases and some […]

 
Buy Me A Coffee
Thank you for visiting. You can now buy me a beer!