컴파일러 경고(수준 2) CS0458
업데이트: 2007년 11월
오류 메시지
식의 결과 값은 항상 'type name' 형식의 'null'입니다.
The result of the expression is always 'null' of type 'type name'
이 경고는 항상 null이 되는 nullable 식에 의해 발생합니다.
다음 코드에서는 CS0458 경고가 발생하는 경우를 보여 줍니다.
예제
이 예제에서는 이 오류를 발생시키는 nullable 형식의 여러 가지 다른 작업을 보여 줍니다.
// CS0458.cs
using System;
public class Test
{
public static void Main()
{
int a = 5;
int? b = a + null; // CS0458
int? qa = 15;
b = qa + null; // CS0458
b -= null; // CS0458
int? qa2 = null;
b = qa2 + null; // CS0458
qa2 -= null; // CS0458
}
}