<feed version="0.3" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns="http://purl.org/atom/ns#" xml:lang="en-GB"><title>Mihir Solanki</title><link rel="alternate" type="text/html" href="http://www.dotnetjunkies.com/WebLog/mihirsolanki/default.aspx" /><tagline type="text/html">mihirsolanki.com</tagline><id>http://www.dotnetjunkies.com/WebLog/mihirsolanki/default.aspx</id><author><url>http://www.dotnetjunkies.com/WebLog/mihirsolanki/default.aspx</url></author><generator url="http://communityserver.org" version="1.0.1.50214">Community Server</generator><modified>2005-12-06T02:04:00Z</modified><entry><title>Google Launches Google Calendar</title><link rel="alternate" type="text/html" href="http://www.dotnetjunkies.com/WebLog/mihirsolanki/archive/2006/04/13/136782.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:136782</id><created>2006-04-12T21:34:00Z</created><content type="text/html" mode="escaped">&lt;P&gt;Another great service from google : &lt;A href="http://www.google.com/calendar"&gt;Google Calendar&lt;/A&gt;&lt;/P&gt;&lt;IMG src="/WebLog/photos/mihirsolanki/images/136783/original.aspx"&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://www.dotnetjunkies.com/WebLog/aggbug.aspx?PostID=136782" width="1" height="1"&gt;</content><slash:comments>0</slash:comments><wfw:commentRss>http://www.dotnetjunkies.com/WebLog/mihirsolanki/commentrss.aspx?PostID=136782</wfw:commentRss></entry><entry><title>.NET Framework FAQ : What Are Nullable Types?</title><link rel="alternate" type="text/html" href="http://www.dotnetjunkies.com/WebLog/mihirsolanki/archive/2005/12/27/134474.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:134474</id><created>2005-12-27T10:22:00Z</created><content type="text/html" mode="escaped">&lt;P&gt;Unlike reference types, you cannot assign a null into a value type. This is often a problem when interacting with code that interprets a null as having no value, rather than no-reference. The canonical example is database null values in columns that have representation as types such as int or DateTime. To address that, the System namespace provides the structure Nullable defined as:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;public&lt;/SPAN&gt; &lt;SPAN&gt;interface&lt;/SPAN&gt; INullableValue 
{ 
   &lt;SPAN&gt;bool&lt;/SPAN&gt; HasValue{&lt;SPAN&gt;get&lt;/SPAN&gt;;} 
   &lt;SPAN&gt;object&lt;/SPAN&gt; Value{&lt;SPAN&gt;get&lt;/SPAN&gt;;} 
} 
[Serializable] 
&lt;SPAN&gt;public&lt;/SPAN&gt; &lt;SPAN&gt;struct&lt;/SPAN&gt; Nullable : INullableValue,IEquatable&amp;gt;,... where T : &lt;SPAN&gt;struct&lt;/SPAN&gt; 
{ 
   &lt;SPAN&gt;public&lt;/SPAN&gt; Nullable(T value); 
   &lt;SPAN&gt;public&lt;/SPAN&gt; &lt;SPAN&gt;bool&lt;/SPAN&gt; HasValue{&lt;SPAN&gt;get&lt;/SPAN&gt;;} 
   &lt;SPAN&gt;public&lt;/SPAN&gt; T Value{&lt;SPAN&gt;get&lt;/SPAN&gt;;} 
   &lt;SPAN&gt;public&lt;/SPAN&gt; T GetValueOrDefault(); 
   &lt;SPAN&gt;public&lt;/SPAN&gt; T GetValueOrDefault(T defaultValue); 
   &lt;SPAN&gt;public&lt;/SPAN&gt; &lt;SPAN&gt;bool&lt;/SPAN&gt; Equals(Nullable other);    
   &lt;SPAN&gt;public&lt;/SPAN&gt; &lt;SPAN&gt;static&lt;/SPAN&gt; &lt;SPAN&gt;implicit&lt;/SPAN&gt; &lt;SPAN&gt;operator&lt;/SPAN&gt; Nullable(T value); 
   &lt;SPAN&gt;public&lt;/SPAN&gt; &lt;SPAN&gt;static&lt;/SPAN&gt; &lt;SPAN&gt;explicit&lt;/SPAN&gt; &lt;SPAN&gt;operator&lt;/SPAN&gt; T(Nullable value); 

   &lt;SPAN&gt;//More members&lt;/SPAN&gt; 
}&lt;/PRE&gt;
&lt;P&gt;Because the Nullable struct uses a generic type parameter, you can use it to wrap a value type, and assign null into it: &lt;/P&gt;&lt;PRE&gt;Nullable&amp;lt;&lt;SPAN&gt;int&lt;/SPAN&gt;&amp;gt; number = &lt;SPAN&gt;123&lt;/SPAN&gt;; 
Debug.Assert(number.HasValue); 
number = &lt;SPAN&gt;null&lt;/SPAN&gt;; 
Debug.Assert(number.HasValue == &lt;SPAN&gt;false&lt;/SPAN&gt;); 
Debug.Assert(number.Equals(&lt;SPAN&gt;null&lt;/SPAN&gt;));&lt;/PRE&gt;
&lt;P&gt;Once a null is assigned to a nullable type, you can still access it to verify if it has a value, via the HasValue property, or just equate it to null.&lt;/P&gt;
&lt;P&gt;In C# and Visual Basic, you can even use the underlying value type's operators on a nullable type: &lt;/P&gt;&lt;PRE&gt;Nullable&amp;lt;&lt;SPAN&gt;int&lt;/SPAN&gt;&amp;gt; number = &lt;SPAN&gt;0&lt;/SPAN&gt;; 
number++;&lt;/PRE&gt;
&lt;P&gt;The reason this is possible is because the compiler is capable of verifying that the underlying type supported the operator, and applying it on the value stored in the structure. This is called lifted operators. &lt;/P&gt;
&lt;P&gt;The Nullable struct also provides conversion operators, so you can convert a nullable type to and from a real value type:&lt;/P&gt;&lt;PRE&gt;Nullable&amp;lt;&lt;SPAN&gt;int&lt;/SPAN&gt;&amp;gt; nullableNumber = &lt;SPAN&gt;123&lt;/SPAN&gt;; 
&lt;SPAN&gt;int&lt;/SPAN&gt; number = (&lt;SPAN&gt;int&lt;/SPAN&gt;)nullableNumber; 
Debug.Assert(number == &lt;SPAN&gt;123&lt;/SPAN&gt;); 

number = &lt;SPAN&gt;456&lt;/SPAN&gt;; 
nullableNumber = number; 
Debug.Assert(nullableNumber.Equals(&lt;SPAN&gt;456&lt;/SPAN&gt;));&lt;/PRE&gt;
&lt;P&gt;Note that using Nullable on Nullable is disallowed, and the compiler will issue an error: &lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;//This will not compile:&lt;/SPAN&gt; 
Nullable&amp;lt;Nullable&amp;lt;&lt;SPAN&gt;int&lt;/SPAN&gt;&amp;gt;&amp;gt; number = &lt;SPAN&gt;123&lt;/SPAN&gt;;&lt;/PRE&gt;
&lt;P&gt;You can use the overloaded methods GetValueOrDefault() of Nullable to defensively obtain either the value stored in the nullable type or it its default, if it does contain a null: &lt;/P&gt;&lt;PRE&gt;Nullable&amp;lt;DateTime&amp;gt; time = &lt;SPAN&gt;null&lt;/SPAN&gt;; 
DateTime value = time.GetValueOrDefault(); 
Debug.Assert(value.ToString() == &lt;SPAN&gt;"1/1/0001 12:00:00 AM"&lt;/SPAN&gt;);&lt;/PRE&gt;
&lt;P&gt;The System namespace also defines the static helper class Nullable and the helper class NullableConverter, but those are not needed usually. &lt;/P&gt;
&lt;P&gt;The C# 2.0 compiler supports shorthand for Nullable. You can use the ? modifier on value types to actually construct a Nullable around it:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;int?&lt;/SPAN&gt; number = &lt;SPAN&gt;123&lt;/SPAN&gt;; 
Debug.Assert(number.HasValue); 
number = &lt;SPAN&gt;null&lt;/SPAN&gt;; 
Debug.Assert(number.HasValue == &lt;SPAN&gt;false&lt;/SPAN&gt;);&lt;/PRE&gt;
&lt;P&gt;Note that the type declared by the ? modifier is identical to that created using Nullable directly:&lt;/P&gt;&lt;PRE&gt;Debug.Assert(&lt;SPAN&gt;typeof&lt;/SPAN&gt;(&lt;SPAN&gt;int?&lt;/SPAN&gt;) == &lt;SPAN&gt;typeof&lt;/SPAN&gt;(Nullable&amp;lt;&lt;SPAN&gt;int&lt;/SPAN&gt;&amp;gt;));&lt;/PRE&gt;
&lt;P&gt;As with using Nullable directly, the compiler supports lifted operators. Whenever you combine nullable types using operators, if any one of them is null, then the resulting expression will be null too:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;int?&lt;/SPAN&gt; number1 = &lt;SPAN&gt;123&lt;/SPAN&gt;; 
&lt;SPAN&gt;int?&lt;/SPAN&gt; number2 = &lt;SPAN&gt;null&lt;/SPAN&gt;; 
&lt;SPAN&gt;int?&lt;/SPAN&gt; sum = number1 + number2; 
Debug.Assert(sum == &lt;SPAN&gt;null&lt;/SPAN&gt;);&lt;/PRE&gt;
&lt;P&gt;Using the ? modifier is the common way of declaring and using nullable variables in C#. You can even pass nullable types as type arguments for generic types:&lt;/P&gt;&lt;PRE&gt;IList&amp;lt;&lt;SPAN&gt;int?&lt;/SPAN&gt;&amp;gt; list = &lt;SPAN&gt;new&lt;/SPAN&gt; List&amp;lt;&lt;SPAN&gt;int?&lt;/SPAN&gt;&amp;gt;(); 
list.Add(&lt;SPAN&gt;3&lt;/SPAN&gt;); 
list.Add(&lt;SPAN&gt;null&lt;/SPAN&gt;);&lt;/PRE&gt;
&lt;P&gt;C# 2.0 also provides the null coalescing operator via the ?? operator. &lt;/P&gt;&lt;PRE&gt;c = a ?? b;&lt;/PRE&gt;
&lt;P&gt;The result of applying the ?? operator on two operands returns the left hand side operand (a) if it is not null, and the right operand (b)otherwise. While b can of course be null too, you typically use the ?? operator to supply a default value in case a is null. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Summary&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Nullable types represent value-type variables that can be assigned the value of null. You cannot create a nullable type based on a reference type. (Reference types already support the null value.) 
&lt;LI&gt;The syntax T? is shorthand for System.Nullable, where T is a value type. The two forms are interchangeable. 
&lt;LI&gt;Assign a value to a nullable type in the same way as for an ordinary value type, for example int? x = 10; or double? d = 4.108; 
&lt;LI&gt;Use the System.Nullable.GetValueOrDefault&amp;nbsp;method to return either the assigned value, or the default value for the underlying type if the value is null, for example int j = x.GetValueOrDefault(); 
&lt;LI&gt;Use the HasValue and Value read-only properties to test for null and retrieve the value, for example if(x.HasValue) j = x.Value; 
&lt;LI&gt;The HasValue property returns true if the variable contains a value, or false if it is null. 
&lt;LI&gt;The Value property returns a value if one is assigned, otherwise a System.InvalidOperationException is thrown. 
&lt;LI&gt;The default value for a nullable type variable sets HasValue to false. The Value is undefined. 
&lt;LI&gt;Use the ?? operator to assign a default value that will be applied when a nullable type whose current value is null is assigned to a non-nullable type, for example int? x = null; int y = x ?? -1; 
&lt;LI&gt;Nested nullable types are not allowed. The following line will not compile: Nullable&amp;lt;Nullable&amp;lt;&lt;SPAN&gt;int&lt;/SPAN&gt;&amp;gt;&amp;gt; n;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT&gt;Source : MSDN&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://www.dotnetjunkies.com/WebLog/aggbug.aspx?PostID=134474" width="1" height="1"&gt;</content><slash:comments>0</slash:comments><wfw:commentRss>http://www.dotnetjunkies.com/WebLog/mihirsolanki/commentrss.aspx?PostID=134474</wfw:commentRss></entry><entry><title>Project Management FAQ : What is Scrum?</title><link rel="alternate" type="text/html" href="http://www.dotnetjunkies.com/WebLog/mihirsolanki/archive/2005/12/23/134453.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:134453</id><created>2005-12-23T08:24:00Z</created><content type="text/html" mode="escaped">&lt;P&gt;An agile software development methodology developed by &lt;A href="http://en.wikipedia.org/wiki/Ken_Schwaber"&gt;Ken Schwaber&lt;/A&gt; and &lt;A href="http://jeffsutherland.com/scrum/"&gt;Jeff Sutherland &lt;/A&gt;in the mid 1990s. Scrum is based on a "Sprint," which is a 30-day period for delivering a working part of the system. Each Sprint starts with a two to three-hour planning session that includes the customer (product owner), the facilitator (Scrummaster) and the cross-functional team. The customer describes the highest priority in the backlog, and after the team agrees on how much of it to do, it is left alone to do it. To keep the team synchronized, there is a 15-minute meeting every day. At the end of the Sprint, the results are delivered and reviewed, and the next Sprint is started.&lt;/P&gt;
&lt;P&gt;Scrum projects support the use of any software engineering discipline. However, since XP (Extreme Programming) and Scrum share many core practices, Scrum and XP integrate well together. The name comes from Rugby, where a scrum is the mechanism for getting the ball moving after it has gone out of play. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Characteristics of Scrum&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Scrum is an agile process to manage and control development work. 
&lt;LI&gt;Scrum is a wrapper for existing engineering practices. 
&lt;LI&gt;Scrum is a team-based approach to iteratively, incrementally develop systems and products when requirements are rapidly changing 
&lt;LI&gt;Scrum is a process that controls the chaos of conflicting interests and needs. 
&lt;LI&gt;Scrum is a way to improve communications and maximize co-operation. 
&lt;LI&gt;Scrum is a way to detect and cause the removal of anything that gets in the way of developing and delivering products. 
&lt;LI&gt;Scrum is a way to maximize productivity. 
&lt;LI&gt;Scrum is scalable from single projects to entire organizations. Scrum has controlled and organized development and implementation for multiple interrelated products 
&lt;LI&gt;and projects with over a thousand developers and implementers. 
&lt;LI&gt;Scrum is a way for everyone to feel good about their job, their contributions, and that they have done the very best they possibly could. &lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://www.dotnetjunkies.com/WebLog/aggbug.aspx?PostID=134453" width="1" height="1"&gt;</content><slash:comments>0</slash:comments><wfw:commentRss>http://www.dotnetjunkies.com/WebLog/mihirsolanki/commentrss.aspx?PostID=134453</wfw:commentRss></entry><entry><title>.NET Framework FAQ : What is managed code and managed data?</title><link rel="alternate" type="text/html" href="http://www.dotnetjunkies.com/WebLog/mihirsolanki/archive/2005/12/22/134430.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:134430</id><created>2005-12-21T20:48:00Z</created><content type="text/html" mode="escaped">&lt;p&gt;&lt;strong&gt;Managed code&lt;/strong&gt; is code that is written to target the services 
of the Common Language Runtime (see What is the Common Language Runtime?). In 
order to target these services, the code must provide a minimum level of 
information (metadata) to the runtime. All C#, Visual Basic.NET, and JScript.NET 
code is managed by default. Visual Studio.NET C++ code is not managed by 
default, but the compiler can produce managed code by specifying a command-line 
switch (/CLR).&lt;/p&gt;
&lt;p&gt;Closely related to managed code is &lt;strong&gt;managed data&lt;/strong&gt;—data that is 
allocated and de-allocated by the Common Language Runtime's garbage collector. 
C#, Visual Basic, and JScript.NET data is managed by default. C# data can, 
however, be marked as unmanaged through the use of special keywords. Visual 
Studio.NET C++ data is unmanaged by default (even when using the /CLR switch), 
but when using Managed Extensions for C++, a class can be marked as managed by 
using the __gc keyword. As the name suggests, this means that the memory for 
instances of the class is managed by the garbage collector. In addition, the 
class becomes a full participating member of the .NET Framework community, with 
the benefits and restrictions that brings. An example of a benefit is proper 
interoperability with classes written in other languages (for example, a managed 
C++ class can inherit from a Visual Basic class). An example of a restriction is 
that a managed class can only inherit from one base class.&lt;/p&gt;&lt;img src="http://www.dotnetjunkies.com/WebLog/aggbug.aspx?PostID=134430" width="1" height="1"&gt;</content><slash:comments>0</slash:comments><wfw:commentRss>http://www.dotnetjunkies.com/WebLog/mihirsolanki/commentrss.aspx?PostID=134430</wfw:commentRss></entry><entry><title>.NET Framework FAQ : How do I dynamically resolve assemblies, types, and resources?</title><link rel="alternate" type="text/html" href="http://www.dotnetjunkies.com/WebLog/mihirsolanki/archive/2005/12/20/134418.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:134418</id><created>2005-12-20T09:05:00Z</created><content type="text/html" mode="escaped">&lt;P&gt;The assembly resolution is controlled by the configuration properties for the application domain such as System.AppDomainSetup.ApplicationBase. The configuration properties may not be sufficient in some hosting scenarios, especially if the host is creating assemblies in memory on the fly using Reflection Emit, since there may not be an assembly on disk to find. In such cases, you can use the System.AssemblyResolve event to hook into the type loading process.&lt;/P&gt;
&lt;P&gt;The AssemblyResolve event is defined as follows:&lt;/P&gt;
&lt;P&gt;public event ResolveEventHandler AssemblyResolve;&lt;/P&gt;
&lt;P&gt;where System.ResolveEventHandler is defined as follows:&lt;/P&gt;
&lt;P&gt;public delegate Assembly ResolveEventHandler(Object sender, ResolveEventArgs args);&lt;/P&gt;
&lt;P&gt;The args parameter to ResolveEventHandler is the identity of the assembly the runtime is seeking. The receipient of the event is free to resolve the reference to the assembly by any means. For example, the receipient may construct an assembly on the fly, find it in a custom location on disk, etc. The only requirement is that the receipient return a instance of System.Reflection.Assembly. &lt;/P&gt;
&lt;P&gt;A type is resolved dynamically by defining a handler for the TypeResolve event. The TypeResolve event is defined as follows:&lt;/P&gt;
&lt;P&gt;public event ResolveEventHandler TypeResolve;&lt;/P&gt;
&lt;P&gt;A resource is resolved dynamically by defining a handler for the ResourceResolve event. The ResourceResolve event is defined as follows:&lt;/P&gt;
&lt;P&gt;public event ResolveEventHandler ResourceResolve;&lt;/P&gt;
&lt;P&gt;For both types and resources, the handler must resolve the assembly in which the entity is defined. The code for the handler is very similar to the handler shown in the sample above.&lt;/P&gt;&lt;img src="http://www.dotnetjunkies.com/WebLog/aggbug.aspx?PostID=134418" width="1" height="1"&gt;</content><slash:comments>0</slash:comments><wfw:commentRss>http://www.dotnetjunkies.com/WebLog/mihirsolanki/commentrss.aspx?PostID=134418</wfw:commentRss></entry><entry><title>.NET Framework FAQ : What is the difference between a Struct and a Class ?</title><link rel="alternate" type="text/html" href="http://www.dotnetjunkies.com/WebLog/mihirsolanki/archive/2005/12/16/134355.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:134355</id><created>2005-12-16T01:12:00Z</created><content type="text/html" mode="escaped">&lt;p&gt;The struct type is suitable for representing lightweight objects such as 
Point, Rectangle, and Color. Although it is possible to represent a point as a 
class, a struct is more efficient in some scenarios. For example, if you declare 
an array of 1000 Point objects, you will allocate additional memory for 
referencing each object. In this case, the struct is less expensive.&lt;/p&gt;
&lt;p&gt;When you create a struct object using the new operator, it gets created and 
the appropriate constructor is called. Unlike classes, structs can be 
instantiated without using the new operator. If you do not use new, the fields 
will remain unassigned and the object cannot be used until all of the fields are 
initialized.&lt;/p&gt;
&lt;p&gt;It is an error to declare a default (parameterless) constructor for a struct. 
A default constructor is always provided to initialize the struct members to 
their default values.&lt;/p&gt;
&lt;p&gt;It is an error to initialize an instance field in a struct.&lt;/p&gt;
&lt;p&gt;There is no inheritance for structs as there is for classes. A struct cannot 
inherit from another struct or class, and it cannot be the base of a class. 
Structs, however, inherit from the base class Object. A struct can implement 
interfaces, and it does that exactly as classes do.&lt;/p&gt;
&lt;p&gt;A struct is a value type, while a class is a reference type.&lt;br&gt;&lt;/p&gt;&lt;img src="http://www.dotnetjunkies.com/WebLog/aggbug.aspx?PostID=134355" width="1" height="1"&gt;</content><slash:comments>0</slash:comments><wfw:commentRss>http://www.dotnetjunkies.com/WebLog/mihirsolanki/commentrss.aspx?PostID=134355</wfw:commentRss></entry><entry><title>ADO.NET FAQ : Which are the different Transaction Isolation Levels?</title><link rel="alternate" type="text/html" href="http://www.dotnetjunkies.com/WebLog/mihirsolanki/archive/2005/12/14/134319.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:134319</id><created>2005-12-14T01:17:00Z</created><content type="text/html" mode="escaped">&lt;p&gt;Following are the various IsolationLevels:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Serialized&lt;/strong&gt;&amp;nbsp;&amp;nbsp;: Data read by a current transaction cannot be 
changed by another transaction until the current transaction finishes. No new 
data can be inserted that would affect the current transaction. This is the 
safest isolation level and is the default.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Repeatable Read&lt;/strong&gt;&amp;nbsp;:&amp;nbsp;Data read by a current transaction cannot 
be changed by another transaction until the current transaction finishes. Any 
type of new data can be inserted during a transaction.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Read Committed &lt;/strong&gt;:&lt;strong&gt; &lt;/strong&gt;A transaction cannot read 
data that is being modified by another transaction that has not committed. This 
is the default isolation level in Microsoft SQL Server.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Read Uncommitted&lt;/strong&gt;&amp;nbsp;:&amp;nbsp;A transaction can read any data, even if 
it is being modified by another transaction. This is the least safe isolation 
level but allows the highest concurrency.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Any&amp;nbsp;&lt;/strong&gt;:&amp;nbsp;Any isolation level is supported. This setting is most 
commonly used by downstream components to avoid conflicts. This setting is 
useful because any downstream component must be configured with an isolation 
level that is equal to or less than the isolation level of its immediate 
upstream component. Therefore, a downstream component that has its isolation 
level configured as Any always uses the same isolation level that its immediate 
upstream component uses. If the root object in a transaction has its isolation 
level configured to Any, its isolation level becomes Serialized. &lt;/p&gt;&lt;img src="http://www.dotnetjunkies.com/WebLog/aggbug.aspx?PostID=134319" width="1" height="1"&gt;</content><slash:comments>63</slash:comments><wfw:commentRss>http://www.dotnetjunkies.com/WebLog/mihirsolanki/commentrss.aspx?PostID=134319</wfw:commentRss></entry><entry><title>CSharp FAQ : What's New in the C# 2.0 Language and Compiler?</title><link rel="alternate" type="text/html" href="http://www.dotnetjunkies.com/WebLog/mihirsolanki/archive/2005/12/13/134308.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:134308</id><created>2005-12-13T11:04:00Z</created><content type="text/html" mode="escaped">&lt;p&gt;With the release of Visual Studio 2005, the C# language has been updated to 
version 2.0, which supports the following new features:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Generics&lt;/strong&gt;&lt;br&gt;Generic types are added to the language to 
enable programmers to achieve a high level of code reuse and enhanced 
performance for collection classes. Generic types can differ only by arity. 
Parameters can also be forced to be specific types.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Iterators&lt;br&gt;&lt;/strong&gt;Iterators make it easier to dictate how a 
foreach loop will iterate over a collection's contents.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Partial Classes&lt;/strong&gt;&lt;br&gt;Partial type definitions allow a single 
type, such as a class, to be split into multiple files. The Visual Studio 
designer uses this feature to separate its generated code from user code.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Nullable Types&lt;/strong&gt;&lt;br&gt;Nullable types allow a variable to contain 
a value that is undefined. Nullable types are useful when working with databases 
and other data structures that may contain elements that contain no specific 
values.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Anonymous Methods&lt;/strong&gt;&lt;br&gt;It is now possible to pass a block of 
code as a parameter. Anywhere a delegate is expected, a code block can be used 
instead: there is no need to define a new method.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Namespace alias qualifier&lt;/strong&gt;&lt;br&gt;The namespace alias qualifier 
(::) provides more control over accessing namespace members. The global :: alias 
allows access the root namespace that may be hidden by an entity in your 
code.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Static Classes&lt;/strong&gt;&lt;br&gt;Static classes are a safe and convenient 
way of declaring a class containing static methods that cannot be instantiated. 
&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;External Assembly Alias&lt;br&gt;&lt;/strong&gt;Reference different versions of 
the same component contained in the same assembly with this expanded use of the 
extern keyword.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Property Accessor Accessibility&lt;/strong&gt;&lt;br&gt;It is now possible to 
define different levels of accessibility for the get and set accessors on 
properties.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Covariance and Contravariance in Delegates&lt;/strong&gt;&lt;br&gt;The method 
passed to a delegate may now have greater flexibility in its return type and 
parameters.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Declare, Instantiate, and Use a Delegate&lt;/strong&gt;&lt;br&gt;Method group 
conversion provides a simplified syntax for declaring delegates.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Fixed Size Buffers&lt;/strong&gt;&lt;br&gt;In an unsafe code block, it is now 
possible to declare fixed-size structures with embedded arrays.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Friend Assemblies&lt;/strong&gt;&lt;br&gt;Assemblies can provide access to 
non-public types to other assemblies.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Inline warning control&lt;/strong&gt;&lt;br&gt;The #pragma warning directive may 
be used to disable and enable certain compiler warnings.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;volatile&lt;/strong&gt; &lt;br&gt;The volatile keyword can now be applied to 
IntPtr and UIntPtr.&lt;/p&gt;
&lt;p&gt;The C# compiler introduces the following additions and changes for this 
release:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;/errorreport option&lt;/strong&gt;&lt;br&gt;Can be used to report internal 
compiler errors to Microsoft over the Internet.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;/incremental option&lt;br&gt;&lt;/strong&gt;Has been removed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;/keycontainer and /keyfile options&lt;/strong&gt;&lt;br&gt;Support specifying 
cryptographic keys.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;/langversion option&lt;/strong&gt;&lt;br&gt;Can be used to specify compatibility 
with a specific version of the language.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;/linkresource option&lt;/strong&gt;&lt;br&gt;Contains additional options.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;/moduleassemblyname option&lt;br&gt;&lt;/strong&gt;Allows you to build a 
.netmodule file and access non-public types in an existing assembly.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;/pdb option&lt;/strong&gt;&lt;br&gt;Specifies the name and location of the .pdb 
file.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;/platform option&lt;br&gt;&lt;/strong&gt;Enables you to target Itanium Family 
(IPF) and x64 architectures.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;#pragma warning&lt;/strong&gt;&lt;br&gt;Used to disable and enable individual 
warnings in code.&lt;br&gt;&lt;/p&gt;&lt;img src="http://www.dotnetjunkies.com/WebLog/aggbug.aspx?PostID=134308" width="1" height="1"&gt;</content><slash:comments>0</slash:comments><wfw:commentRss>http://www.dotnetjunkies.com/WebLog/mihirsolanki/commentrss.aspx?PostID=134308</wfw:commentRss></entry><entry><title>.NET Framework FAQ : How are Generics implemented?</title><link rel="alternate" type="text/html" href="http://www.dotnetjunkies.com/WebLog/mihirsolanki/archive/2005/12/12/134269.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:134269</id><created>2005-12-12T02:28:00Z</created><content type="text/html" mode="escaped">&lt;p&gt;Generics have native support in IL and the CLR itself. When you compile 
generic server-side code, the compiler compiles it into IL, just like any other 
type. However, the IL only contains parameters or place holders for the actual 
specific types. In addition, the metadata of the generic server contains generic 
information such as constraints. &lt;/p&gt;
&lt;p&gt;The client-side compiler uses that generic metadata to support type safety. 
When the client provides a type arguments, the client's compiler substitutes the 
generic type parameter in the server metadata with the specified type. This 
provides the client's compiler with type-specific definition of the server, as 
if generics were never involved. At run time, the actual machine code produced 
depends on whether the specified types are value or reference type. If the 
client specifies a value type, the JIT compiler replaces the generic type 
parameters in the IL with the specific value type, and compiles it to native 
code. However, the JIT compiler keeps track of type-specific server code it 
already generated. If the JIT compiler is asked to compile the generic server 
with a value type it has already compiled to machine code, it simply returns a 
reference to that server code. Because the JIT compiler uses the same 
value-type-specific server code in all further encounters, there is no code 
bloating. &lt;/p&gt;
&lt;p&gt;If the client specifies a reference type, then the JIT compiler replaces the 
generic parameters in the server IL with object, and compiles it into native 
code. That code will be used in any further requests for a reference type 
instead of a generic type parameter. Note that this way the JIT compiler only 
reuses actual code. Instances are still allocated according to their size off 
the managed heap, and there is no casting. &lt;/p&gt;&lt;img src="http://www.dotnetjunkies.com/WebLog/aggbug.aspx?PostID=134269" width="1" height="1"&gt;</content><slash:comments>0</slash:comments><wfw:commentRss>http://www.dotnetjunkies.com/WebLog/mihirsolanki/commentrss.aspx?PostID=134269</wfw:commentRss></entry><entry><title>ASP.NET FAQ : Themes vs. Cascading Style Sheets</title><link rel="alternate" type="text/html" href="http://www.dotnetjunkies.com/WebLog/mihirsolanki/archive/2005/12/11/134253.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:134253</id><created>2005-12-10T23:03:00Z</created><content type="text/html" mode="escaped">&lt;p&gt;A theme is a collection of property settings that allow you to define the 
look of pages and controls, and then apply the look consistently across pages in 
a Web application, across an entire Web application, or across all Web 
applications on a server.&lt;/p&gt;
&lt;p&gt;Cascading Style Sheets (CSS) is a stylesheet language used to describe the 
presentation of a document written in a&amp;nbsp; markup language(i.e HTML).&lt;/p&gt;
&lt;p&gt;Themes are similar to cascading style sheets in that both themes and style 
sheets define a set of common attributes that can be applied to any page. 
However, themes differ from style sheets in the following ways:.&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Themes are control-based, not HTML-based. Themes can define many properties 
of a control or page, not just style properties. For example, using themes, you 
can specify the graphics for a TreeView control, the template layout of a 
GridView control, and so on. 
&lt;/li&gt;&lt;li&gt;Themes do not cascade the way style sheets do. For example, by default, 
property values override local property values unless you explicitly apply the 
theme as a style sheet theme. 
&lt;/li&gt;&lt;li&gt;Only one theme can be applied to each page. You cannot apply multiple themes 
to a page, unlike style sheets where multiple style sheets can be applied. 
&lt;/li&gt;&lt;li&gt;Themes are applied on the server where as stylesheet on the client side. 
&lt;/li&gt;&lt;li&gt;Themes can be applied through configuration files.&lt;/li&gt;&lt;/ul&gt;&lt;img src="http://www.dotnetjunkies.com/WebLog/aggbug.aspx?PostID=134253" width="1" height="1"&gt;</content><slash:comments>0</slash:comments><wfw:commentRss>http://www.dotnetjunkies.com/WebLog/mihirsolanki/commentrss.aspx?PostID=134253</wfw:commentRss></entry><entry><title>ASP.NET FAQ : Does ASP.NET support server-side object tags?</title><link rel="alternate" type="text/html" href="http://www.dotnetjunkies.com/WebLog/mihirsolanki/archive/2005/12/10/134249.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:134249</id><created>2005-12-10T09:39:00Z</created><content type="text/html" mode="escaped">&lt;p&gt;Yes. The following tag creates an instance of a custom type named 
ShoppingCart and assigns it session scope (that is, it creates a unique 
ShoppingCart instance for each and every session created on the server):&lt;/p&gt;
&lt;p class="code"&gt;&amp;lt;object id="MyShoppingCart" class="ShoppingCart" 
scope="session" runat="server" /&amp;gt;&lt;/p&gt;
&lt;p&gt;Managed types created this way are identified by class name. Unmanaged types 
(COM classes) are identified by CLSID or ProgID.&lt;/p&gt;&lt;img src="http://www.dotnetjunkies.com/WebLog/aggbug.aspx?PostID=134249" width="1" height="1"&gt;</content><slash:comments>0</slash:comments><wfw:commentRss>http://www.dotnetjunkies.com/WebLog/mihirsolanki/commentrss.aspx?PostID=134249</wfw:commentRss></entry><entry><title>ASP.NET FAQ : How can I provide a default value for a password TextBox?</title><link rel="alternate" type="text/html" href="http://www.dotnetjunkies.com/WebLog/mihirsolanki/archive/2005/12/09/134226.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:134226</id><created>2005-12-08T20:43:00Z</created><content type="text/html" mode="escaped">&lt;p&gt;When a TextBox control has its TextMode property set to Password, you cannot 
assign a default value to the control using the standard Text property. In order 
to assign a default value, you need to use code that looks like this:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;C# Version&lt;/strong&gt;&lt;/p&gt;
&lt;p class="code"&gt;txtPassword.Attributes["value"] = "default value";&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;VB.NET Version&lt;/strong&gt;&lt;/p&gt;
&lt;p class="code"&gt;txtPassword.Attributes("value") = "default value"&lt;/p&gt;&lt;img src="http://www.dotnetjunkies.com/WebLog/aggbug.aspx?PostID=134226" width="1" height="1"&gt;</content><slash:comments>2</slash:comments><wfw:commentRss>http://www.dotnetjunkies.com/WebLog/mihirsolanki/commentrss.aspx?PostID=134226</wfw:commentRss></entry><entry><title>SQL Server FAQ : How to join tables from different servers?</title><link rel="alternate" type="text/html" href="http://www.dotnetjunkies.com/WebLog/mihirsolanki/archive/2005/12/08/134200.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:134200</id><created>2005-12-07T19:02:00Z</created><content type="text/html" mode="escaped">&lt;P&gt;To be able to join tables between two SQL Servers, first you have to link them. After the linked servers are setup, you just have to prefix your tables names with server name, database name, table owner name in your SELECT queries. The following example links SERVER_01 to SERVER_02. Execute the following commands in SERVER_02:&lt;/P&gt;
&lt;P&gt;EXEC sp_addlinkedserver SERVER_01&lt;BR&gt;GO&lt;/P&gt;
&lt;P&gt;/* The following command links 'sa' login on SERVER_02 with the 'sa' login of SERVER_01 */&lt;BR&gt;EXEC sp_addlinkedsrvlogin @rmtsrvname = 'SERVER_01', @useself = 'false', @locallogin = 'sa', @rmtuser = 'sa', @rmtpassword = 'sa password of SERVER_01'&lt;BR&gt;GO&lt;/P&gt;
&lt;P&gt;SELECT a.title_id&lt;BR&gt;FROM SERVER_01.pubs.dbo.titles a&lt;BR&gt;INNER JOIN SERVER_02.pubs.dbo.titles b&lt;BR&gt;ON a.title_id = b.title_id&lt;BR&gt;GO&lt;/P&gt;&lt;img src="http://www.dotnetjunkies.com/WebLog/aggbug.aspx?PostID=134200" width="1" height="1"&gt;</content><slash:comments>2</slash:comments><wfw:commentRss>http://www.dotnetjunkies.com/WebLog/mihirsolanki/commentrss.aspx?PostID=134200</wfw:commentRss></entry><entry><title>.NET Framework FAQ : What is Partial Assembly References?</title><link rel="alternate" type="text/html" href="http://www.dotnetjunkies.com/WebLog/mihirsolanki/archive/2005/12/07/134181.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:134181</id><created>2005-12-06T20:34:00Z</created><content type="text/html" mode="escaped">&lt;p&gt;&lt;strong&gt;Full Assembly reference&lt;/strong&gt;: A full assembly reference includes 
the assembly's text name, version, culture, and public key token (if the 
assembly has a strong name). A full assembly reference is required if you 
reference any assembly that is part of the common language runtime or any 
assembly located in the global assembly cache.&lt;br&gt;&amp;nbsp;&lt;br&gt;&lt;strong&gt;Partial Assembly 
reference&lt;/strong&gt;: We can dynamically reference an assembly by providing only 
partial information, such as specifying only the assembly name. When you specify 
a partial assembly reference, the runtime looks for the assembly only in the 
application&amp;nbsp; directory.&lt;br&gt;&lt;br&gt;We can make partial references to an assembly in 
your code one of the following ways:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Use a method such as System.Reflection.Assembly.Load and specify only a 
partial reference. The runtime checks for the assembly in the application 
directory. 
&lt;/li&gt;&lt;li&gt;Use the System.Reflection.Assembly.LoadWithPartialName method and specify 
only a partial reference. The runtime checks for the assembly in the application 
directory and in the global assembly cache&lt;/li&gt;&lt;/ul&gt;&lt;img src="http://www.dotnetjunkies.com/WebLog/aggbug.aspx?PostID=134181" width="1" height="1"&gt;</content><slash:comments>0</slash:comments><wfw:commentRss>http://www.dotnetjunkies.com/WebLog/mihirsolanki/commentrss.aspx?PostID=134181</wfw:commentRss></entry><entry><title>.NET Framework FAQ : What is the Common Language Runtime (CLR)?</title><link rel="alternate" type="text/html" href="http://www.dotnetjunkies.com/WebLog/mihirsolanki/archive/2005/12/06/134157.aspx" /><id>58df7014-fd75-437c-9641-150997716d1c:134157</id><created>2005-12-05T18:04:00Z</created><content type="text/html" mode="escaped">&lt;P&gt;The Common Language Runtime is the execution engine for .NET Framework applications.&lt;/P&gt;
&lt;P&gt;It provides a number of services, including the following: &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Code management (loading and execution) 
&lt;LI&gt;Application memory isolation 
&lt;LI&gt;Verification of type safety 
&lt;LI&gt;Conversion of IL to native code 
&lt;LI&gt;Access to metadata (enhanced type information) 
&lt;LI&gt;Managing memory for managed objects 
&lt;LI&gt;Enforcement of code access security 
&lt;LI&gt;Exception handling, including cross-language exceptions 
&lt;LI&gt;Interoperation between managed code, COM objects, and pre-existing DLLs (unmanaged code and data) 
&lt;LI&gt;Automation of object layout 
&lt;LI&gt;Support for developer services (profiling, debugging, and so on) &lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://www.dotnetjunkies.com/WebLog/aggbug.aspx?PostID=134157" width="1" height="1"&gt;</content><slash:comments>0</slash:comments><wfw:commentRss>http://www.dotnetjunkies.com/WebLog/mihirsolanki/commentrss.aspx?PostID=134157</wfw:commentRss></entry></feed>