Check out http://www.developer.com/net/csharp/article.php/3589916 for my article on " Anonymous Types ", This cool new feature coming in C# 3.0 is surely going to go places. Codeguru also contains the same article at http://www.codeguru.com/csharp/csharp/cs_misc/designtechniques/article.php/c11551/ Next...
Many a times, we use the catch block inside the try catch block for our clean up code. Something like try { // Do something } catch { // work failed, clean up code here } Rather than the above approach of using the catch block, it would be nicer to use the finally block, something like bool workSuccessful...
Visual Studio.NET Service Packs are due this year, but their site is up already (The site clearly mentions it is still in process) http://msdn.microsoft.com/vstudio/support/servicing/default.aspx Visual Studio 2003 Service Pack 1 ships Q2, 2006 Visual Studio 2005 Service Pack 1 ships Q3, 2006
Frequently we desire to autopopulate some fields on our web form with the current logged in username and domain. How to get that information? Well, User.Identity.Name comes to the rescue. Set the text property of the field to User.Identity.Name and it will show the logged-in username prefixed by the...
You notice that you have a chuck of code which could easily be transitioned to a new function. How tdo you do that? Again, Visual Studio Refactoring menu comes to the rescue. Suppose you have the following code in your function public void Myfunc() { Console .WriteLine( "a" ); Console .WriteLine( "b...
Here is a C# code snippet to determine if a particular DLL is registered or not. [DllImport("kernel32")] public extern static int LoadLibrary( string lpLibFileName); [DllImport("kernel32")] public extern static bool FreeLibrary( int hLibModule); public bool IsDllRegistered( string DllName) { int libId...
Wohoo! Enterprise library for .NET Framework 2.0 has just been released. More details at http://msdn.microsoft.com/library/?url=/library/en-us/dnpag2/html/EntLib2.asp Direct download link: http://www.microsoft.com/downloads/details.aspx?FamilyId=5A14E870-406B-4F2A-B723-97BA84AE80B5&displaylang=en
While we are on the topic of System.Web.Mail , it is important to note a new namespace in version 2.0 of the .NET Framework. There is a brand new namespace for sending mail via managed code, it is called System.Net.Mail . Have no fear, System.Web.Mail is still accessible in v2.0 but it is deprecated...
Do you have some students who want to learn Visual Basic .NET or C# on their own? Or perhaps you want to learn them as part of your own professional development. Well if so, Microsoft has a free series of lessons for absolute beginners. They look pretty good to me. I am sure that may others will find...
Steven Pratschner, Program Manager, .NET Compact Framework, lists down reasons why one should upgrade ot the latest version of the .NET compact framework. Highlights: Applications run faster Developers are more productive Developers are more productive Developing secure applications is much easier Access...