Thursday, 1 December 2011

Creating and Sorting Arrays in C#

private void csharp_array()
{
string[] arCities = {"","","",""};
arCities[0] = "Zurich";
arCities[1] = "Havana";
arCities[2] = "Amalapuram";
arCities[3] = "San Francisco";
//arnames
Array.Sort(arCities);
}
Array.Sort method sorts the elements in an entire one-dimensional Array using the IComparable implementation of each element of the Array.


Before Sorting


After Sorting


Sorting Arrays in C#, Creating Arrays in C#, Array.Sort in C#, Sorting One Dimensional arrays using C#, C# Array sort method

Creating Simple Windows Forms Application using C#

1. Start Visual Studio.
2. Create a Windows Application called HelloWorld.
3. From the Toolbox, drag a Label control onto the form.
4. Double Click the label to add an event handler.
5. Insert the following code:
private void label1_Click(object sender, EventArgs e)
{
MessageBox.Show("Hello World");
}
How to create Windows Forms Application using C#


Create a Windows Application
Drag a Label

Get Computer Name in .Net

Use the My object to get the name of the computer

' Returns Name of the Computer

Function Get_Comp_Name() As String

Return My.Computer.Name.ToString

End Function

The VBA/Visual Basic function to do the same is :
http://vbadud.blogspot.com/2007/05/get-computer-name.html

The SQL Statement to get the computer name is :
http://sqldud.blogspot.com/2007/04/get-computer-name-from-sql-query.html

Tuesday, 22 November 2011

Asp.net Page lifecycle

ASP.Net Page LifeCycle


ASP.NET Page Life Cycle Diagram

Follow this link to get more detail...

http://msdn.microsoft.com/en-us/library/ms178472.aspx