View minimum int with int.MinValue()?
Hello,
I am trying to store and view the minimum int number. I have understood that I should use int.MinValue but this code gives the error:
"Non-invocable member "int.MinValue"cannot be used like at method "
Code:
int a;
a = int.MinValue();
Console.Write("The minimum int value is {0}, a");
I have also tried with int32.MinValue()
Re: View minimum int with int.MinValue()?
MinValue is a property not a method so remove the parentheses and read the documentation more carefully, the a must not be a part of the string, it's a variable and if you want to dispalay its value you must use it as a parameter
PHP Code:
int a = int.MinValue;
Console.Write("The minimum int value is {0}", a);
Re: View minimum int with int.MinValue()?
I see, thank you for the answer. I am new to this.