Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
long? is analog Nullable<T>
. If you look at the documentation, it becomes clear that this is a structure with two public fields: HasValue and Value, so it works like this:
//вариант 1
long? foo = ...;
if (foo.HasValue)
{
bar(foo.Value);
}
//вариант 2 (для самых смелых)
bar(foo.Value);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question