Posts

Showing posts from September, 2010

Value Types and Reference Types Explained

Image
There are two types of data types in the .NET framework: Value and reference types. Lets first have a look at the value types : Value types are allocated on the current thread’s stack. The lifetime of the value type is only inside the scope where it is used. When you pass a value type as a parameter in a method, the value type is copied. A wrapper object is created if you pass a value type to a method that expects an object. Value types are suitable for representing lightweight objects such as vectors, matrices and colors. Value types has less overhead than classes by the fact that no additional memory for the reference is needed. However, there are a few things that are worth mentioning: Structs can’t have a default parameterless constructor. It is provided by default and it initializes all the fields to their default values. You can’t initialize an instance field inside a struct You can’t use inheritance in structs Value types are important for

Blank Visual Studio 2010 Team Explorer Window

Recently I decided to upgrade my Visual Studio 2008 installation to Visual Studio 2010. I uninstalled all VS2008 packages and made sure to clean out folders left behind. After a long VS2010 installation I fired up Team Explorer and connected to my Codeplex.com projects; after doing so, I was met by an empty Team Explorer window. Several reinstalls later and registry changes I tried reading up on how to repair installations and came across the command: devenv /setup The setup switch did the trick and I now have a fully working Team Explorer window.