November 16, 2009

C# COM Wrapper

One of the classes that I use often, will show in details this with other classes that are part of my AzMan main solution.
public class ComWrapper
{
public object Object { get; set; }
public Type Type { get; private set; }

public ComWrapper(object obj, Type type)
{
this.Object = obj;
this.Type = type;
}

public static ComWrapper Create(T obj)
{
return new ComWrapper(obj, typeof(T));
}
}

No comments:

Post a Comment