All these Classes need to be described. Who wants to help? Helping is really easy and a straight forward task. It's enough if you pick only *one* class. Contact me at johannes@jroith.de.
Console.Write() : Writes output to the console.
Console.WriteLine() : Adds \n at the end of the line.
Both are overloaded serval time, so you can pass them Boolean, Int32, Char, Double, String, ...
Console.Read() : Read a single char.
Console.WriteLine() : Reads complete line.
// getname.cs
using System;
class consoletest {
public static void Main(){
string name;
Console.Write("Please enter your name: ");
name = Console.ReadLine();
Console.WriteLine("Hello, " + name + "!");
}
}
Each number is then accessible as obj.Major, obj.Minor, obj.Revision, obj.Build.
// guidtest.cs
// Generates a version form 4 integers, Splits the numbers again from the string.
using System;
class versiontest {
public static void Main(){
Version v = New Version(1, 3, 12, 40);
// v.ToString() is now "1.3.12.40"
Version v2 = New Version(v.ToString());
Console.WriteLine("Major:" + v2.Major);
Console.WriteLine("Minor:" + v2.Minor);
Console.WriteLine("Revision:" + v2.Revision);
Console.WriteLine("Build:" + v2.Build);
}
}
Important is, that the method NewGuid must be called, to generate an unique number.
// guidtest.cs
using System;
class guidtest {
public static void Main(){
string name;
Guid myguid = New Guide();
myguide = myguide.NewGuid();
Console.WriteLine(myguide.ToString());
}
}
Offers many mathematical funtions:
[TODO: Write a big example, where they all can be used]
There is nothing to explain, instead of that here is a good commented example, printing all properties.
[TODO: Write Example]
// enviroment.cs
using System;
class Enviroment {
public static void Main(){
Console.WriteLine("Computer name: " + System.Enviroment.MachineName);
// continue...
}
}