开发者

Why Does Type.GetType fail on the .NET Compact Framework 3.5

开发者 https://www.devze.com 2023-01-20 06:38 出处:网络
I am trying to de开发者_开发技巧-serialize a XML string back to an object. The code does NOT have a reference to the assembly that has the class definition. We keep the fully qualified name in the XML

I am trying to de开发者_开发技巧-serialize a XML string back to an object. The code does NOT have a reference to the assembly that has the class definition. We keep the fully qualified name in the XML document using XmlTextWriter.WriteProcessingInstruction, so we use that to get the type at runtime.

GetType( fullyQualifiedAssemblyName, false, true );

This of course works perfectly on the full framework.


The reason is because the ignoreCase #3 parameter cannot be true in the compact framework. Apparently case insensitive searching is not supported in the Compact Framework. Turning on the throwOnError option in parameter 2 helped me identify the problem.

I don't see any documentation that describes this behavior so I thought I would post it here.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号