dimanche 11 janvier 2015

C# not all code paths return a value?


Vote count:

0





class Program
{
static void Main()
{
string x = "example!";
string y = "example2!";
Rec.printreceipt.Receipt(x, y);

}
}
}

namespace Rec
{
class printreceipt
{
public static string Receipt(string x, string y)
{
x = " ";
y = " ";
Console.WriteLine("Your values are {0} and {1}!", x, y);

}
}
}


'Rec.printreceipt.Receipt(string, string)': not all code paths return a value'


This is a simple program that simply puts the string example! and example2 through the process and prints them back out. I continue to get this error if someone could point out to me what I'm doing wrong that would be great. Note: I am VERY NEW to C# so I beg of you to be very patient with me! Thanks! (: introducing me to easier ways or alternate ways to carry out the code are also appreciated!



asked 48 secs ago







C# not all code paths return a value?

Aucun commentaire:

Enregistrer un commentaire