RSSAll Entries Tagged With: "C#"

Jagged Arrays C#

A jagged array is an array whose elements are arrays. The elements of a jagged array can be of different dimensions and sizes. A jagged array is sometimes called an “array of arrays.” The following examples show how to declare, initialize, and access jagged arrays.
You have several rows of data, such as integers, and want [...]

Alert Message using C#

Usually we generate Alert Message using Java Script in our .aspx page. But we can also generate an Alert Message from out Code behind page using C# and JavaScript. Below is the code which will display the Alert Message up on Button Click.

1
2
3
4
5
6
7
8
9
10
private void MessaegBox(String msg)
[...]

Shut Down, Restart and Log Off PC using .NET, C#

Using .NET and C#.NET, We can perform Shut Down, Restart and Log off operation on current PC.
In .NET Framework we have a namespace Using System.Diagnostics which has the required class and methods to perform these operations from a .NET application running on a current PC.
Please Use the below buttons to perform Shutdown, Restart and [...]

Difference between Convert.ToString() and .ToString() in C#

Well most of us might have seen Convert.TOString() and .ToString() in C# code. Baically both are used to convert a value to a String but there is a basic difference between them. When we have an NULL object, Convert.ToString(Object); handles the NULL value but where as Object.ToString(); does not handle the NULL value and it [...]

Difference between String and string in C#

For many C# newbies, it is a common confusion by seeing String and string. Both of them will be used as per individual preference and need.
String comes from a class System.String in .NET Framework where as string is an C# alias for System.String. As per the individual’s preference they use either String(Upper case) or [...]