Reporter | Peter Hoogenboom (phoogenb) |
---|---|
Created | Dec 28, 2011 1:55:04 AM |
Updated | Feb 17, 2012 11:13:42 PM |
Resolved | Feb 17, 2012 5:10:27 PM |
Priority | Normal |
Type | Unspecified |
Fix versions | Next |
State | Fixed |
Assignee | Evgeny Pasynkov (pasynkov) |
Subsystem | No subsystem |
Affected versions | No Affected versions |
Fixed in build | 6.5.1.4627 |
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)