开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜