To referencethe string type in programs, we can have several choices:
1.
including a “using System”
/**/
/* String */
Using System;
public class stringExample1
... {
static void Main()
...{
String vv = "I’m a string!";
}
}
Using System;
public class stringExample1
... {
static void Main()
...{
String vv = "I’m a string!";
}
}
2.
No “using ” directive included
/**/
/* System.String */
// No "using" directive needed!
public class stringExample2
... {
static void Main()
...{
System.String vv = "I’m a string too!";
}
}
// No "using" directive needed!
public class stringExample2
... {
static void Main()
...{
System.String vv = "I’m a string too!";
}
}
3.
No “using ” directive included
/**/
/* string */
// No "using" directive needed!
public class stringExample3
... {
static void Main()
...{
string vv = "I’m the simplest string!";
}
}
// No "using" directive needed!
public class stringExample3
... {
static void Main()
...{
string vv = "I’m the simplest string!";
}
}