C# - monitor directory activity using FileSystemWatcher class

C#

Posted on

15,280 views

System.IO.FileSystemWatcher class allows you to monitor physical directory activity, listen to the file system change notifications and raises events when a directory, or file in a directory changes.
I'we made small WPF application that will demonstrate you how use this class.

C# - serialize object to JSON format using JavaScriptSerializer

C#

Posted on

138,800 views

12 comments

"Serialization is the process of converting the state of an object into a form that can be persisted or transported. The complement of serialization is deserialization, which converts a stream into an object. Together, these processes allow data to be easily stored and transferred."

Export data to Excel using C#

C#

Posted on

26,567 views

6 comments

In this article I will show you how to export data from generic collection to Excel file.
Assume you are working with list of Car entities. Car has some properties like name, color, and maximum speed. In this case, your entity would look like this...


Advanced using of delegates in C# - Part II

C#

Posted on

3,507 views

4 comments

In first article about the delegates, I tried to explain, basic concept of delegates, and how it could be used.
In this article I shall present you the use of delegates in real world situations!

If you liked concept of delegates in my previous article, feel free to keep on reading! :)

Understanding and using delegates in C# - Part I

C#

Posted on

1,686 views

Delegate is a type that defines a method signature. It is also an object that receives that method as parameter when constructed and then call's that method to do some operation.

public delegate int MathematicalOperation(int numberA, int numberB);

Using PLINQ (Parallel Language In Query) in .NET 4.0

C#

Posted on

1,385 views

Parallel LINQ (PLINQ) is a parallel implementation of LINQ to Objects. It is located in System.Threading.Tasks.Parallel.

In many scenarios, PLINQ can significantly increase the speed of LINQ to Objects queries by using all available cores on the host computer more efficiently.

I bring you my example, where I tested the speed of PLINQ, and the increase of speed was enormous!

Tuple in C# 4.0

C#

Posted on

1,382 views

A System.Tuple is static class that allows you to create collection of specific data-typed values.

You can store values like...
Tuple tuple = new Tuple<int, string, string, bool>(1, "Matija", "Božičević", true);
...or you can create it in more easy way...
var tuple = Tuple.Create(1, "Matija", "Božičević", true);