Client Server, retunere mindste værdi
Hi..I have a client server program ..
The Server returns the smallest number of two numbers entered by the client.
The numbers is sent to the server by a one string and the numbers are seperated by a comma. The samllest of the two numbers should returns to the client.
Here is the code, but i think there is something wrong.. Any help please :)
Klient koden:
Console.WriteLine("Indtast 2 tal separeret med et komma");
string ToTal = Console.ReadLine();
writer.Write(Convert.ToString(ToTal));
string answer = reader.ReadString();
Console.WriteLine(answer);
Serrver Koden:
string ToTal = reader.ReadString();
Console.WriteLine(Math.Min(ToTal)); // Hvordan får denne metode til kun at læse en streng? måske skal jeg bruge Split() metoden? Og læset Math metoden ik kun int værdier?
På forhånd Tak :)