开发者

C#: How to get the type definition of my enum..?

开发者 https://www.devze.com 2022-12-09 16:45 出处:网络
This feels like a really basic question, but I can\'t figure it out anyway.. How do I get the type of System.Windows.Visibility? I need to pass the type definition to a function. More precisly I\'m

This feels like a really basic question, but I can't figure it out anyway..

How do I get the type of System.Windows.Visibility? I need to pass the type definition to a function. More precisly I'm writing unit tests for a IValueConverter I'm writing where the target type is a System.Windows.Visibility. What do I pass as target type when calling Convert..?

public object Conv开发者_Python百科ert(object value, Type targetType, object parameter, CultureInfo culture)


typeof(System.Windows.Visibility)


Are you asking for typeof ?

typeof(System.Windows.Visibility)


typeof(System.Windows.Visibility);

will do the trick :)

lol, 3 exactly the same answers within a minute of each other :/

0

精彩评论

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