In the C#, DataSet object is the set the more than one DataTables. You can add the multiple dataTables into the single DataSet object. You can set constraint information for a DataTable by using the PrimaryKey and Unique properties. Continue reading Adding a DataTable to a DataSet in C#
With the help of the following code snippet, you can know the location of your currently used wallpaper on your desktop.
Continue reading How to get the location of your current desktop wallpaper using C#
Sometime arithmetic operation produce a result that exceeds the range of the data type involved in the operation. At this time , the result is said to overflow. for the example, consider the following code of lines: Continue reading Walkthorugh for error – Arithmetic Operation Resulted In An Overflow.
We can use the static constructor in class. Generally we use the static constructor to initialize any static data or if if want to any operation only one time. The Static constructor is called before creating first instance of the class. Continue reading Static constructor in normal class in C#
C# offers the ability to create the static class. Static class contains only static members and all members can be access without creating any object of the class. The following are the two main features of the static class: Continue reading A quick example of the static class in C#
The following example shows how to use out parameter in class constructor in C#. Basically out parameters are used to pass result back to the calling method. Continue reading How to create constructor of the class with out parameter in C#
With the help of Facebook Graph API, we can get various information about any Facebook page. The Graph API as such allows you to easily access all public information about an object. The Graph API presents a simple, consistent view of the Facebook social graph and every object in the social graph has a unique ID. You can access the properties of an object by requesting https://graph.facebook.com/ID or https://graph.facebook.com/username.
For example, the username of the authorcode Facebook page is ‘authorcode’, so you can fetch the object at https://graph.facebook.com/authorcode.
We can also use the Facebook Graph api in c#.
Suppose if you want to get the total numbers of likes of your Facebook page, you can use the following code sample:
Runtime type identification of any object is useful for many reason such as when you need to casting of the objects or when you use the base class, you can get the what type of the object is being referred to by a base class reference. Another is when you need to perform various operation according to type of object. Continue reading How to identify the type of Object or the Class at runtime in C#
Yes, You can use more than one type parameters in Generic class.For it you can use the parameters list with comma separated ( if you are new with Generics Read this article Generics in C#) . See the following example:
Continue reading Can you use the two parameters with Generic class in C#
The following code example demonstrates how we can extract the all numbers from the specified text. Continue reading Find numbers from a text in c#