Is there any way (maybe using an attribute) that I can force strings or
other reference parameters to always have an instance even if they are
blank? Ex:
[WebMethod]
public string DoSomething(string Text)
{
if (Text != null) /// i would like to avoid checks like this. they get
to be annoying when passing a lot of strings
DoWork();
}
If a blank string is passed to this function, the framework won't create a
string instance. I would prefer that it did so I wouldn't have to pepper my
code with != null checks.