Using Annotations

I have a method that terminates the current ASP.NET page processing when it
is called (it wraps a Response.Redirect).  How do I have to annotate the
method so that the code that calls this method knows this?  The problem that
I am running into is that I will do something like:

If( myObject.Parameter == null)
{
    Navigate.RedirectTo("~\myObjectParameterSelector");
}

var id = myObject.Parameter.ID; // This is marked as Possible Null
Reference.


1 comment
Comment actions Permalink

Hello David,

You can mark your method with attribute. In order to
get this attribute definition in your project, open ReSharper > Options >
Code Inspection > Code Annotations, click 'Copy default implementation to
clipboard' and paste it into some code file. Thank you!

Andrey Serebryansky
Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

I have a method that terminates the current ASP.NET page processing
when it is called (it wraps a Response.Redirect).  How do I have to
annotate the method so that the code that calls this method knows
this?  The problem that I am running into is that I will do something
like:

If( myObject.Parameter == null)
{
Navigate.RedirectTo("~\myObjectParameterSelector");
}
var id = myObject.Parameter.ID; // This is marked as Possible Null
Reference.



0

Please sign in to leave a comment.