Microsoft Research Pex
Pex (Program EXploration) is an intelligent assistant to the programmer. By automatically generating unit tests, it allows to find bugs early. In addition, it suggests to the programmer how to fix the bugs.
Pex enables a new development experience in Visual Studio Team System, taking test-driven development to the next level. Pex analyzes .NET applications. From a parameterized unit test, it automatically produces traditional unit tests cases with high code coverage. Moreover, when a generated test fails, Pex can often suggest a bug fix. Read the rest of this entry »
ASP.NET 2.0 Tips, Tricks, Recipes and Gotchas
This page lists some of the more popular “ASP.NET 2.0 Tips, Tricks, Recipes and Gotchas” posts by Scott Guthrie
Acrobat Forms Data Format (FDF) – iTextSharp
For those of you working with FDF I recommend using iTextSharp rather than Acrobat FDF Toolkit
The iText# (iTextSharp) is a port of the iText open source java library written entirely in C# for the .NET platform. iText# is a library that allows you to generate PDF files on the fly. It is implemented as an assembly.
On contrary Acrobat FDF Toolkit is available as an ActiveX component in your .net application and thus involves COM Interoperability.
.NET: The Web’s New DNA
Check out a nice sleek introductory article about .net here
Can I have null assigned to an int ?
Well in .net 1.1, obviously NO! “int” is a value type and “null” cannot be assigned to a value type. Well what to do then? Interestingly in .net 2.0 we can have nullable value types by simply declaring a variable as:
int x = null; //Cannot convert null to ‘int’ because it is a value type
int? x = null; //Allowed
Pretty cool way of declaring nullable value types. Wait there’s a bit more to add here. How would you check if some variable has a value of “null” or not?
You might be thinking of writing something like:
Console.WriteLine((x != null? 1 : 0));
How about writing it like this:
Console.WriteLine((x ?? 0));.net 2.0 introduces a new operator “??” which is called as “null coalescing operator”. As you can see it’s a very powerful operator as it provides you the “null checking abilities” in your code. It works by the following rule of thumb: “Return the first value if not null otherwise simply return the second value if null”. MSDN describes it as “The ?? operator returns the left-hand operand if it is not null, or else it returns the right operand.”
Another interesting thing to note is that if you have a nullable type and you want to assign it to a non-nullable type then you need to make use of the “??” operator. Otherwise the compiler will generate an error. For example if I write as:
int y = x; //Cannot implicitly convert type ‘int?’ to ‘int’. An explicit conversion
exists (are you missing a cast?)
Now if you use the cast here and the nullable type is undefined i.e. null then an InvalidOperationException exception will be thrown.
The WindowsClient.NET Community Site Launches
This site focuses on all aspects of rich client development on Windows using the .NET Framework. New content from both the Microsoft product teams and from the community will be added regularly to highlight the many user experience and developer productivity benefits of rich client applications on Windows.
Grasshopper 2.0 Technology Preview 2
ASP.NET 2.0 in Pure Java Runtime, with Grasshopper 2.0 – Grasshopper 2.0 Technology Preview 2, a plug-in to the Microsoft Visual Studio development environment, which introduces support for .NET Framework 2.0. Use C# 2.0, ASP.NET 2.0 controls and generics to develop Web applications and deploy them on Linux and other Java-enabled platforms. The Visual Studio 2005 debugger makes it easy to attach your Web application to Java and control its execution!For specific release information, check the Release Notes.
String Interning | String Comparison
One of the wonderful concepts in .net I learned recently STRING INTERNING :O
Comparing Values for Equality in .NET: Identity and Equivalence
Factoring Configuration
All of us have been involved in Code Refactoring at some stage during our development. How about factoring out the config file.?? Well I stumbled upon this excellent post by Nikhil Kothari where he describes how it is all done!
Also, there is an option that prevents an application restart when an external config file changes. The RestartOnExternalChanges property is by default true, but if you set to false, then changes to that external file won’t cause the application to restart!
Interop Forms Toolkit v2.0
On May 02, 2007 version 2.0 of the Interop Forms Toolkit has been released. It is one of several Visual Basic Power Packs MS has developed over the past year that help bridge the gap between Visual Basic 6 and Visual Basic 2005. The Interop Forms Toolkit 2.0 allows developers to display .NET Forms and Controls from within a Visual Basic 6 application. The Interop Forms Toolkit 2.0 extends well beyond the 1.0 version we released in September of last year – developers can now include .NET UI code and functionality within existing Visual Basic 6 forms and in all kinds of Visual Basic 6 applications, including MDI applications. Read the rest of this entry »