[runtime] Require C# namespace to be quoted.
[mono-project.git] / mono / tests / reflection-load-with-context-lib.cs
blob9aca41fe3e5614313f4e042a52c5fd3e2c36f066
1 using System;
3 namespace B
5 public class MyAttribute : Attribute {
6 public Type Type { get; set; }
7 public MyAttribute (Type t) {
8 Type = t;
10 public override string ToString () {
11 return "My " + Type;
15 [My (typeof (A.ClassA))]
16 public class ClassB { // A.AnotherClassA
18 public ClassB () {
19 Console.WriteLine ("IN B");
20 Console.WriteLine (typeof (ClassB).AssemblyQualifiedName);
21 var t = Type.GetType ("B.ClassB, reflection-load-with-context-lib, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null");
22 Console.WriteLine (t);
23 t = Type.GetType ("A.ClassA, reflection-load-with-context-second-lib, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null");
24 Console.WriteLine ("class a: {0}", t);
25 if (t == null)
26 throw new Exception ("FAIL");