P puzzlecracker Oct 8, 2008 #1 I call method Foo(string s); with Foo("foo"+"bar"); what's the deal here?
J Jon Skeet [C# MVP] Oct 8, 2008 #2 I call method Foo(string s); with Foo("foo"+"bar"); what's the deal here? Click to expand... My guess is that you're doing something like: string x = Foo("foo" + "bar"); If not, please show a short but complete program which demonstrates the problem. Jon
I call method Foo(string s); with Foo("foo"+"bar"); what's the deal here? Click to expand... My guess is that you're doing something like: string x = Foo("foo" + "bar"); If not, please show a short but complete program which demonstrates the problem. Jon
I Ignacio Machin ( .NET/ C# MVP ) Oct 8, 2008 #3 I call method Foo(string s); with Foo("foo"+"bar"); what's the deal here? Click to expand... post your complete code I do nt know if you are doing string s = Foo("foo"+"bar"); or Foo( Foo("foo"+"bar") );
I call method Foo(string s); with Foo("foo"+"bar"); what's the deal here? Click to expand... post your complete code I do nt know if you are doing string s = Foo("foo"+"bar"); or Foo( Foo("foo"+"bar") );
I Ignacio Machin ( .NET/ C# MVP ) Oct 8, 2008 #4 I call method Foo(string s); with Foo("foo"+"bar"); what's the deal here? Click to expand... In any case your method is returning void, it should be returning string
I call method Foo(string s); with Foo("foo"+"bar"); what's the deal here? Click to expand... In any case your method is returning void, it should be returning string
P puzzlecracker Oct 8, 2008 #5 My guess is that you're doing something like: string x = Foo("foo" + "bar"); If not, please show a short but complete program which demonstrates the problem. Jon Click to expand... I just call a method, with concatenation of two strings,that takes string parameter. That's all. BTW what is wrong with string x = Foo("foo" + "bar"); ?
My guess is that you're doing something like: string x = Foo("foo" + "bar"); If not, please show a short but complete program which demonstrates the problem. Jon Click to expand... I just call a method, with concatenation of two strings,that takes string parameter. That's all. BTW what is wrong with string x = Foo("foo" + "bar"); ?
D Duggi Oct 8, 2008 #6 I just call a method, with concatenation of two strings,that takes string parameter. That's all. BTW what is wrong with string x = Foo("foo" + "bar"); ? Click to expand... can you please post the signature of method please? I guess it is public/private void Foo(string) -Cnu
I just call a method, with concatenation of two strings,that takes string parameter. That's all. BTW what is wrong with string x = Foo("foo" + "bar"); ? Click to expand... can you please post the signature of method please? I guess it is public/private void Foo(string) -Cnu
J Jon Skeet [C# MVP] Oct 8, 2008 #7 I just call a method, with concatenation of two strings,that takes string parameter. That's all. Click to expand... I'm afraid I don't believe you. Please post a short but complete program that demonstrates the problem. BTW what is wrong with string x = Foo("foo" + "bar"); ? Click to expand... If Foo is declared to be void, then you can't assign a string variable based on the result, because there isn't one. Jon
I just call a method, with concatenation of two strings,that takes string parameter. That's all. Click to expand... I'm afraid I don't believe you. Please post a short but complete program that demonstrates the problem. BTW what is wrong with string x = Foo("foo" + "bar"); ? Click to expand... If Foo is declared to be void, then you can't assign a string variable based on the result, because there isn't one. Jon