C# Type IsSpecialName
Description
Type IsSpecialName
gets a value indicating whether the
Type has a name that requires special handling.
Syntax
Type.IsSpecialName
has the following syntax.
public bool IsSpecialName { get; }
Example
using System;/*ww w .j av a2 s .c om*/
namespace SystemType
{
public class MyClass
{
[Serializable] public class MyTestClass
{
}
public static void Main(string []args)
{
try
{
bool myBool = false;
MyTestClass myTestClassInstance = new MyTestClass();
Type myType = myTestClassInstance.GetType();
Console.WriteLine(myType.IsSpecialName);
}
catch (Exception e)
{
Console.WriteLine("\nAn exception occurred: {0}", e.Message);
}
}
}
}
The code above generates the following result.