Thottam R. Sriram

Development Lead, Hosted Services (Current)

Program Manager, CLR Team (2005-2007)

Generic list and powershell

I met with an accident recently riding my motorcycle and hence was unable to blog for some time....

Author: thottams@microsoft.com Date: 10/12/2009

Debug .NET Framework Source Code and loading SOS in Visual Studio

I found this blog post from Shawn Burke to be very useful. Comes in handy if you have to step...

Author: thottams@microsoft.com Date: 05/08/2009

Asynchronous delegates and callback

I was debugging some issue related to asynchronous delegates and wanted to share that information...

Author: thottams@microsoft.com Date: 04/11/2009

System.Data.DataException and System.Data.DataSet.RaiseMergeFailed exception

This was another interesting issue I encountered recently. The error presented itself as an event...

Author: thottams@microsoft.com Date: 03/24/2009

CString and GetLength

I ran into this problem recently when debugging some native code and thought that it will be good to...

Author: thottams@microsoft.com Date: 02/06/2009

NTSD and SOS: StopOnException

using System; class Program { static void Main(string[] args) { Program p = new Program();...

Author: thottams@microsoft.com Date: 01/15/2009

XMLSerializer, XDocument and LINQ

I took the sample from my previous post and wanted to use LINQ to query the XML. You can pretty much...

Author: thottams@microsoft.com Date: 10/01/2008

XmlSerialization to generate and consume XML

I want to talk about Xml Serialization this month. One of the work I was involved in recently...

Author: thottams@microsoft.com Date: 08/29/2008

Simple sample for Events and Delegates

I wanted to write a small sample to illustrate events and delegates. Here is a compact sample that...

Author: thottams@microsoft.com Date: 08/01/2008

DBNull and Nullable types

When we have C# code interacting with the data base you run into this problem. Let me try and...

Author: thottams@microsoft.com Date: 06/30/2008

Diagnostics: Using ETW tracing in .NET 3.5 (EventProviderTraceListener)

.NET exposes an elegant diagnostics model that can be used by applications. It is a bit confusing to...

Author: thottams@microsoft.com Date: 05/29/2008

Unhandled Exception handler (UnhandledExceptionEventHandler) to collect more information about unexpected exceptions

To continue on the exception post from last week I did a bit more research and learnt some more. I...

Author: thottams@microsoft.com Date: 04/30/2008

Handling, throwing - exceptions and Clean up on error

There are four ways to throw an exception in my opinion. They are: 1. Throw a new exception a. throw...

Author: thottams@microsoft.com Date: 03/24/2008

Code Access Security, LinkDemand and Effective Sandbox

I wrote about Deny and Assert in my previous blog post. In my repeated attempts to get the previous...

Author: thottams@microsoft.com Date: 02/12/2008

Code Access Security - Understanding Demand and Declarative Security

I wanted to talk about Code Access Security this time. Code Access Security is a big in itself. In...

Author: thottams@microsoft.com Date: 01/25/2008

Calling delegates using BeginInvoke, Invoke, DynamicInvoke and delegate

I wanted to write about delegates this month. There are different ways in which you can invoke...

Author: thottams@microsoft.com Date: 11/01/2007

Posting from word

I was cutting and pasting from word till now to post. It was long in my list to try and use word and...

Author: thottams@microsoft.com Date: 09/19/2007

Why is generic constructor not allowed?

Generic argument is not allowed in the constructor. When I compile the code below I get a...

Author: thottams@microsoft.com Date: 09/19/2007

Same name for a generic and non-generic class

I was writing a sample to do something and I noticed that when I declare and instantiate a generic...

Author: thottams@microsoft.com Date: 09/19/2007

New role within Microsoft

After almost two years with the CLR team I have decided to move on and take new challenges. I have...

Author: thottams@microsoft.com Date: 08/20/2007

MSDN article about COM Connection Points and managed client

I wrote my second article in MSDN which got published in the September issue. This article is about...

Author: thottams@microsoft.com Date: 08/20/2007

Managed C++ and C#

I tried writing a sample to use managed C++ to interact with managed code and here is my learning. I...

Author: thottams@microsoft.com Date: 07/16/2007

How to control the version of .NET Framework your application runs against?

Let us look at a small sample that illustrated how this configuration entry works. using System;...

Author: thottams@microsoft.com Date: 06/11/2007

Debugging load problems using fusion log

Fusion log comes in very handy when you want to understand or debug binding behaviors. Let us take...

Author: thottams@microsoft.com Date: 06/02/2007

PInvoke-Reverse PInvoke and __stdcall - __cdecl

I came across this issue yesterday and thought that I will blog about the same. The example below...

Author: thottams@microsoft.com Date: 06/02/2007

Load contexts and Type.GetType

Type.GetType(AN,T) actually translates to Assembly.Load(AN).GetType(T). This actually can be the...

Author: thottams@microsoft.com Date: 05/11/2007

Two versions of an assembly in an AppDomain

The CLR binder today allows you to either accidentally or intentionally load two versions of a given...

Author: thottams@microsoft.com Date: 04/11/2007

NTSD and SOS – Adding a break point on a method with reference to a specific thread

I wanted to set a conditional break point from managed code and it was hard to do that using SOS. In...

Author: thottams@microsoft.com Date: 03/02/2007

NTSD and SOS basics

I wanted to take a very simple console application and use ntsd with SOS to debug it. The example...

Author: thottams@microsoft.com Date: 02/12/2007

MDBG ver 2.1 released

I was talking with Mithun about ntsd-SOS just recently. He was trying to convince me to use mdbg...

Author: thottams@microsoft.com Date: 02/07/2007

Using ILASM and ILDASM

I wanted to write another small sample to demonstrate how you can use ilasm to modify a compiled...

Author: thottams@microsoft.com Date: 02/01/2007

Introduction to Versioning and BindingRedirect

I want to share with you this sample that demonstrates how to version an assembly. An...

Author: thottams@microsoft.com Date: 01/30/2007

My article on MSDN about COM interop

My article “Introduction to COM interop” got published in MSDN magazine this month. This article...

Author: thottams@microsoft.com Date: 12/18/2006

Type forwarding using TypeForwardedTo attribute in Runtime.CompilerServices

We used this feature to solve a problem internally and I was tempted to blog about this cool...

Author: thottams@microsoft.com Date: 11/16/2006

Managed Debugging Assistants (MDA's)

When I read through the responses for the questionnaire below I saw that many users were not aware...

Author: thottams@microsoft.com Date: 10/20/2006

Tell us about your experience with COM interop

COM interoperability is a very powerful feature in the CLR that bridges the gap between native and...

Author: thottams@microsoft.com Date: 09/27/2006

Lang.NET Symposium 2006 Videos available

The videos of the presentations from Lang.NET symposium 2006 which was held in Redmond from July...

Author: thottams@microsoft.com Date: 09/15/2006

Using CodeDOM to generate CSharp (C#) and VB code

I spent sometime to understand CodeDOM and in the process wrote a sample which will help me...

Author: thottams@microsoft.com Date: 08/15/2006

Accessing CreateProcess from C# and VB.NET

I came across this issue recently. I was trying to access CreateProcess using DLLImport from managed...

Author: thottams@microsoft.com Date: 08/11/2006

Lang.NET Symposium 2006

I still remember us planning for this event a few months back. It started off as a small group of...

Author: thottams@microsoft.com Date: 08/08/2006

Passing Generic List and inheritance ...

I came across this interesting scenario when I was looking into some issues. In a normal method you...

Author: thottams@microsoft.com Date: 07/11/2006

Lang .Net 2006 Compiler Symposium

Registration is now open for the Lang .Net 2006 Compiler Symposium which will be held July 31st...

Author: thottams@microsoft.com Date: 07/05/2006

Kathy's blog

Kathy introduced me in her blog as the new program manager who will be owning Reflection, Reflection...

Author: thottams@microsoft.com Date: 04/28/2006

Creating nested types dynamically using the TypeResolve event

Creating a Type dynamically using the TypeResolve event. I came across this issue recently when I...

Author: thottams@microsoft.com Date: 04/28/2006

Generic dynamic method using DefineMethod

This example illustrates how you can define a generic dynamic method and call it. In the sample...

Author: thottams@microsoft.com Date: 04/25/2006

DynamicMethod and TypeBuilder.DefineMethod

There are two ways you can create a method dynamically. DynamicMethod class TypeBuilder.DefineMethod...

Author: thottams@microsoft.com Date: 04/25/2006

Using SetRaiseMethod and GetRaiseMethod and invoking the method dynamically

The GetRaiseMethod returns null for all events declared with the event keyword as explained in the...

Author: thottams@microsoft.com Date: 03/17/2006

Difference between .cctors and ctors

A static constructor is called when a direct access to any static member of the class is made. The...

Author: thottams@microsoft.com Date: 03/16/2006

Overriding a property using new and reflection

When you override a property using new with a new type there is discrepancy in behavior from C# and...

Author: thottams@microsoft.com Date: 03/16/2006

Reflecting on ParameterInfo for Generic class when ContainsGenericParameter is FALSE will return null

using System; using System.Reflection; public class MyClass<T> { public delegate T...

Author: thottams@microsoft.com Date: 02/15/2006

Next>