Showing posts with label Best Practice. Show all posts
Showing posts with label Best Practice. Show all posts

Daily Tips- Tip #41 -How will you test memory leak in a .NET application?

Wednesday, December 16, 2009


using Perfmon.exe application.


www.codecollege.NET

What is the best practice for calling explicit garbage collections?

Monday, December 14, 2009


You should call the finalizer after gc like,

//c#
GC.Collect();
GC.WaitForPendingFinalizers();


www.codecollege.NET

Which one is a best practice to use DirectCast or CType?


DirectCast


www.codecollege.NET

Which is the best practice in applying multiple attributes to a same member?


Instead of applying it as comma seperated, apply individually in separate lines,
//c#
[Conditional("TRACE")]
[DebuggerStepThrough]
void MyMethod()
{
}


www.codecollege.NET

How will you refine filter condition in Catch blocks and avoid rethrowing an exception?

Monday, December 7, 2009


use When keyword


www.codecollege.NET

Where will you place your user-interface strings ?

Saturday, December 5, 2009


It is a best practice to place all your user-interface strings in a resource file rather burning them in code.


www.codecollege.NET
Blog Widget by LinkWithin