Invalid statement.?

I remember, I read it somewhere, but now I can not find it in the results of Google.

Does the latest C # (VS2013) support any such operator?

SomeObject.?SomeMember = SomeValue;

It is supposed to be assigned SomeValue SomeObject.SomeMemberonly if SomeObjectit is not null.

NB: I know that we can do this through HasValueother ways. I'm just asking about a new operator.

+4
source share
3 answers

Well, this has nothing to do with Nullabletypes.It the null distribution operator and will work for every type, which can be null, and not just for Nullable<T>reference types.

Does the latest C # (VS2013) support any such operator?

Roslyn, VS 2013, Visual Studio 14 CTP 3

+5

Roslyn Null- - . Roslyn VS 14 .

+1

, Visual Studio 2013 . , .

null # 6, CTP Roslyn. Roslyn Visual studio "14" , ( ).

0

All Articles