C# Archive

Sort Posts by:

Cloning an object is much faster in performance

Cloning an object in C# is much faster and light weight than creating a new object. In an IP Camera live video streaming application where one cannot afford a lag in live video its recommended to clone a bitmap if one want to process captured bitmap in

Creating controls dynamically in C# WinForm

If you unsure of the number of records in your Database and would like to show them on a form in C#. You can easily create a Grid like structure dynamically to diaplay different controls at run-time and show data although data can also be shown in

Check is null in c#

You are fetching values from DB and not sure if they have a null value in them. If you directly access them without checking for a null compiler would throw an exception Suppose r is your data reader object and you are assigning phone no. from DB

Split a string in C#

For splitting a string use Split on strings like tokens[0] will output http://www tokens[1] will output memorypointer and so on Usage in foreach

CSV To Datatable C#

Developed a class for reading CSV to Datatable in C#. Posting it on memorypointer.com so someone could find it useful This class reads a CSV file to Datatable mapping field names in CSV to Data Columns and data to Data Rows For exporting datatable to CSV i