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.
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#
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#
.Net framework 2.0 and above provides a concept of Generics, the namespace is System.Collections.Generic that contains some new generic based classes. Generic Classes and methods are useful for the reusability of the code and type safety which are not in other collection classes such as ArrayList. Continue reading Generics in C#
Indexers enables us to create a class, struct, or interface that applications can access just as an array. Indexers resemble properties except that their accessors take parameters. Continue reading A simple indexer example in C#