0

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 Convert(object value, Type targetType, object parameter, CultureInfo culture)

3 Answers 3

9

typeof(System.Windows.Visibility)

Sign up to request clarification or add additional context in comments.

1 Comment

Woot?! Well, of course I tried typeof, but I got some odd errors I didn't understand, so I got misled.. The errors turns out not to address the typeof, so I just got confused at the end of a long day. Of course typeof is correct. Thanks! I said it felt basic ;-)
5

Are you asking for typeof ?

typeof(System.Windows.Visibility)

Comments

5
typeof(System.Windows.Visibility);

will do the trick :)

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.