이 글을 나의 첫 번째 c#알고리즘에 도전하고 실행하고 있으로 문제입니다. 추가 유형을 식별자를 내 모든 변수가 있지만 난 아직도 오류가 발생하는 식별자를 것으로 예상된다. 나는지 확인할 수 있는 방법을 해결할 때 이를 실제 유형 식별자가 있다. 여기에는 나의 코드고 여기에 오류로그에 기록한다.
public class ShortLongShort
{
public static string Solution(string a, string b)
{
string long = a;
string short = b;
if(a.Length < b.Length) {
short = a;
long = b;
}
return short+long+short;
}
}
src/Solution.cs(5,12): error CS1001: Identifier expected
src/Solution.cs(5,12): error CS1002: ; expected
src/Solution.cs(5,17): error CS1001: Identifier expected
src/Solution.cs(6,12): error CS1001: Identifier expected
src/Solution.cs(6,12): error CS1002: ; expected
src/Solution.cs(6,18): error CS1001: Identifier expected
src/Solution.cs(8,15): error CS1001: Identifier expected
src/Solution.cs(9,14): error CS1001: Identifier expected
src/Solution.cs(11,12): error CS1525: Invalid expression term 'short'
src/Solution.cs(11,18): error CS1525: Invalid expression term 'long'
src/Solution.cs(11,23): error CS1525: Invalid expression term 'short'