开发者

Is there a difference between System.Runtime.InteropServices.UCOM* classes and System.Runtime.InteropServices.ComTypes.* in .NET?

开发者 https://www.devze.com 2023-02-03 15:20 出处:网络
I\'m trying to remove a bunch of warnings from an old system and one of them is this: \'System.Runtime.InteropSer开发者_开发百科vices.UCOMIEnumMoniker\' is obsolete: \'Use System.Runtime.InteropServ

I'm trying to remove a bunch of warnings from an old system and one of them is this:

'System.Runtime.InteropSer开发者_开发百科vices.UCOMIEnumMoniker' is obsolete: 'Use System.Runtime.InteropServices.ComTypes.IEnumMoniker instead. http://go.microsoft.com/fwlink/?linkid=14202'

There are similar warnings for other UCOM classes in System.Runtime.InteropServices. The warning is actually fairly clear on what to do, and I really want to follow the advice that it is giving. I would be perfectly comfortable doing just that if they just renamed the classes (removed the 'UCOM' part) and moved them into the ComTypes namespace. But I don't know if that's what they did, so I'm asking you, because if anything happened to really change those classes, I'm not very comfortable to just use the new ones instead, since I have no real way to extensively test any changes (which is a whole other problem that I don't really want to get into now).

So, does anyone know if there is a real difference between these old and new classes?

Thanks!


I'm fairly sure they got renamed because of their grating violation of the .NET framework naming standards. An interface type name needs to start with the letter "I". There are a few very subtle differences between the declarations, nothing that's going to get you into trouble.

0

精彩评论

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