Value assigned is not used in any execution pat

Trips

Well-known member
Joined
Aug 7, 2010
Messages
2,788
For this line: <br/> string classValue = String.Empty;<br/> <br/> I get the warning "value assigned is not used in any execution path".  Just wondering why when I have clearly used it in the Get method.<br/> <br/>             public string Class<br/>             {<br/>                 get { return this.cssClass; }<br/>                 set<br/>                 {<br/>                     string classValue = String.Empty;<br/> <br/>                     if (this.optionalAttributes.TryGetValue("class", out classValue))<br/>                         value = classValue;<br/>                 }<br/>             }<hr class="sig C# Web Developer

View the full article
 
Back
Top