Hi

I noticed a problem when trying importing a nullable bool:

   [Test]
    public void ImportNullable()
    {
      var assDef = AssemblyFactory.DefineAssembly("test", "test",
TargetRuntime.NET_2_0, AssemblyKind.Dll);
      var tr = assDef.MainModule.Import(typeof(bool?));
      Assert.IsTrue(tr.IsValueType);
    }

I would expect IsValueType to return true for "bool?".

Is this a bug?

I fell over that when generating properties/fields with nullable
types, and it may be the cause of a type loader exception.

Any ideas to get around this?

regards
Dirk




--~--~---------~--~----~------------~-------~--~----~
--
mono-cecil
-~----------~----~----~----~------~----~------~--~---

Reply via email to