I have the following line of code:
var dmrReceived = new DownloadMessagesReport(); StyleCop and ReSharper are suggesting I remove the redundant initializer. However if I replace it with
DownloadMessagesReport dmrReceived; surely this will generate an object reference not set to an instance of an object? I am using .NET 3.5. Do you no longer manually have to instantiate objects?
Next line that follows is:
dmrReceived = dc.DownloadNewMessages(param, param2, param3); It's worth noting that dc is a class generated from a WCF service. So DownloadNewMessages is a WCF web service method.