I have a function that returns an instance of a class. This function never returns null. However if I get the return value from this function and try to use it later resharper gives a 'Possible NullReferenceException'. It seems that I need to declare somewhere that my function never returns null so that resharper knows.
How do I do that?