Невозможно сравнить int? обнулитьC#

Место общения программистов C#
Anonymous
Невозможно сравнить int? обнулить

Сообщение Anonymous »

Посмотрите на этот код, который я окружил событием textchanged текстового поля:

Код: Выделить всё

        string testString = comboIPAddress.Text;
string[] parts = testString.Split('.');
int? ipclass = int.Parse(parts[0]);
if (ipclass == null)
{
//do nothing
}

if (ipclass >= 1 && ipclass = 192 && ipclass = 128 && ipclass 

Подробнее здесь: [url]https://stackoverflow.com/questions/16749729/unable-to-compare-int-to-null[/url]

Вернуться в «C#»