Reporter | Peter Hoogenboom (phoogenb) |
---|---|
Created | Dec 28, 2011 1:55:04 AM |
Updated | Dec 28, 2011 1:55:04 AM |
Priority | Normal |
Type | Unspecified |
Fix versions | No Fix versions |
State | Submitted |
Assignee | Unassigned |
Subsystem | No subsystem |
Affected versions | No Affected versions |
Fixed in build | No Fixed in build |
Beginning with C# 2.0, the as operator also supports nullable types (which are not reference types). ReSharper flags the line
with
The as operator must be used with a reference type ('byte' is a value type)
but the corresponding compiler error in C# 4.0 is
The as operator must be used with a reference type or nullable type ('byte' is a non-nullable value type)
var n = 255 as byte;
with
The as operator must be used with a reference type ('byte' is a value type)
but the corresponding compiler error in C# 4.0 is
The as operator must be used with a reference type or nullable type ('byte' is a non-nullable value type)