[2020-02] Avoid following invalid pointers in mono_w32process_get_modules on Darwin...
[mono-project.git] / mono / tests / reflection-prop.cs
blob159f64493a3812daff36e61e1b786fb1c7f8746e
1 using System.Reflection;
2 using System;
4 namespace Test {
5 public class T {
6 public static int Main(string[] args) {
7 string name = "System.String";
8 if (args.Length > 0)
9 name = args [0];
10 Type t = Type.GetType (name);
11 PropertyInfo[] ms = t.GetProperties();
13 foreach (PropertyInfo m in ms) {
14 if (m.CanRead)
15 Console.Write ("Type "+m.PropertyType.Name+" ");
16 Console.WriteLine (m.Name);
18 return 0;