In a Visual Studio 2008 source window, right-click and select Organize Usings | Remove Unused Usings. Visual Studio 2005 users may use ReSharper for this.
P.S. interesting, does this optimization gives you any benefits other than cleaner code?
I was wondering how to capitalize properties which have either ID or OK abbreviation in its name. For example, is it TipID or TipId? I have found the answer in Design Guidelines for Developing Class Libraries:
In Pascal-cased identifiers (all identifiers except parameter names) they should appear as Id, and Ok. If used as the first word in a camel-cased identifier, they should appear as id and ok, respectively.
P.S. And of course .NET Framework doesn't fulfil this rule :) For example, Control.ClientID property.
foreach (DataRow row in dTable.Rows)
{
yourvariable = row["ColumnName"].ToString();
}
//OR
for (int j = 0; j< dTable.Rows.Count; j++)
yourvariable = dTable.Rows[j]["ColumnName"].ToString()l
Use DebuggerStepThroughAttribute
[System.Diagnostics.DebuggerStepThrough()]
public void sample()
// ....