Advertisement
Guest User

C# Reflection

a guest
Jul 28th, 2011
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.66 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace ConsoleApplication2
  7. {
  8.     class Program
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             Type t = typeof(X_Class);
  13.             var tt = t.GetProperties().Where(i => i.PropertyType.Equals(typeof(Zeta)));
  14.             foreach (var item in tt)
  15.             {
  16.                 Console.WriteLine(item.Name.ToString());
  17.             }
  18.  
  19.             Console.ReadLine();
  20.         }
  21.     }
  22.  
  23.     class X_Class
  24.     {
  25.         public Zeta Y_Property { get; set; }
  26.         public Zeta W_Property { get; set; }
  27.     }
  28.  
  29.     class Zeta
  30.     {
  31.     }
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement