My Visual Studio Settings
There is my Visual studio settings (Visual studio 2008) : Sam_Exported-2009-12-02
It’s the “ragnarok” theme with a few modifications
There is my Visual studio settings (Visual studio 2008) : Sam_Exported-2009-12-02
It’s the “ragnarok” theme with a few modifications
In C# you can check if a string is null or empty in many ways :
string String1 = "testString";
if (String1== null || String1 == "")
{
// …
}
else
{
// …
}
string String1 = "testString";
if (String1 == null || String1.Length==0)
{
// …
}
else
{
// …
}
string String1 = "testString";
if (string.IsNullOrEmpty(String1))
{
// …
}
[...]
Use the Stopwatch object !
using System.Diagnostics;
// …
Stopwatch myStopWatch = Stopwatch.StartNew();
// some code
myStopWatch.Stop();
Console.WriteLine("{0} ms – {1} ticks", myStopWatch.Elapsed.TotalMilliseconds, myStopWatch.ElapsedTicks);
// …
More »