[Solved] Convert VB to C# ‘GetCustomAttribute’


You just have to cast to MessageHandler:

InstanceType = (MessageHandler)System.Attribute.GetCustomAttribute(Method, typeof(MessageHandler), false);

The clue is in this part of the error message: An explicit conversion exists (is a cast missing?)

0

solved Convert VB to C# ‘GetCustomAttribute’