Assignments to value types are only necessary when they affect the outcome or functionality of the application. Assigning values to types unnecessarily can detrimentally affect performance, and make code difficult to understand and maintain.
In the following example, the variable "result" is assigned a value that is never used:
' VB
Function AddNums(ByVal num1 As Double, ByVal num2 As Double) As Double
Dim result As Double = num1 + num2
Return num1 + num2
End Function
//C#
double AddNums(double num1, double num2)
{
double result = num1 + num2;
return num1 + num2;
}