0
what is the difference between implicit and explicit declarations of a variable? Please give examples.
2 Antworten
+ 5
var a = 11; // implicit variable declaration
int b = 12; // explicit variable declaration
+ 2
static void main ()
{
int i=10;
object o=i; /implicit declaration (implicit boxing)
object k=(object)i; /explicit declaration (explicit boxing)
console.writeline(i);
console. writeline(o);
console.writeline(k);
}