Visual Studio 2010 Shortcut Keys

Hi,

Get file which contains many useful shortcut for Visual Studio 2010.

the order of columns in the DataGridView

In order to change the order of columns, just set the DisplayIndex property of the DataGridView to the desired value. Remember that the index is zero based.

C#
private void btnReorder_Click(object sender, EventArgs e)
{
dgv.Columns["CustomerID"].DisplayIndex = 5;
dgv.Columns["OrderID"].DisplayIndex = 3;
dgv.Columns["EmployeeID"].DisplayIndex = 1;
dgv.Columns["OrderDate"].DisplayIndex = 2;
dgv.Columns["Freight"].DisplayIndex = 6;
dgv.Columns["ShipCountry"].DisplayIndex = 0;
dgv.Columns["ShipName"].DisplayIndex = 4;
}

VB.NET
Private Sub btnReorder_Click(ByVal sender As Object, ByVal e As EventArgs)
dgv.Columns("CustomerID").DisplayIndex = 5
dgv.Columns("OrderID").DisplayIndex = 3
dgv.Columns("EmployeeID").DisplayIndex = 1
dgv.Columns("OrderDate").DisplayIndex = 2
dgv.Columns("Freight").DisplayIndex = 6
dgv.Columns("ShipCountry").DisplayIndex = 0
dgv.Columns("ShipName").DisplayIndex = 4
End Sub

Byte Array to Image Conversion

Convert byte[] array to Image

public Image byteArrayToImage(byte[] byteArrayIn)
{
MemoryStream ms = new MemoryStream(byteArrayIn);
Image returnImage = Image.FromStream(ms);
return returnImage;
}

New in ASP.NET 4.0, Visual Studio 2010

There are many new things given by Microsoft this times.. i listed some below.

1. Code Snippets
2. New Profiles
3. Generate From Usage
4. Multi-Monitor Support
5. Code Navigation in Class Files
6. Intellisense Improvements
7. EnablePersistedSelection
8. Web.Config Transformation
9. URL Routing
10. Add Reference Dialog
11. Compressing Session Values

and many more…

Please check out

http://www.codeproject.com/KB/aspnet/Whatis_New_ASP_Net_4.aspx

You can also find here “what’s new in C#.net 4.0”

Enjoy Programming…

%d bloggers like this: