C# Type IsCOMObject
Description
Type IsCOMObject
gets a value indicating whether the
Type is a COM object.
Syntax
Type.IsCOMObject
has the following syntax.
public bool IsCOMObject { get; }
Example
/* www. j a v a2 s . c o m*/
using System;
using System.Reflection;
public class MyDemoClass
{
}
public class MyTypeClass
{
public static void Main(string[] args)
{
try
{
Type myType = typeof(MyDemoClass);
Console.WriteLine(myType.IsCOMObject);
}
catch(Exception e)
{
Console.WriteLine("\nAn exception occurred: {0}." ,e.Message);
}
}
}
The code above generates the following result.