Characteristics of the class using System; public enum RemoteServers {TTT, AAA, CHAIN} public class RemoteObjectAttribute: Attribute {public RemoteObjectAttribute (RemoteServers Server) {this.server = Server;} protected RemoteServers server; public string Server {get {return Enum.GetName (TypeOf (transservers), this.server;}}
} [RemoteObjectAttribute (RemoteServers.TTT)] public class RemoteObjectClass {} public class ClientTestApp {public static void Main () {System.Type type = typeof (RemoteObjectClass); foreach (Attribute attr in type.GetCustomAttributes (true)) {RemoteObjectAttribute remoteAttr = Attr as RemoteObjectttribute; if (attr! = null) {Console.WriteLine (RemoteTtr.Server);}}}}