EDN Admin
Well-known member
Hi,
In the documentation for the as operator http://msdn.microsoft.com/query/dev10.query?appId=Dev10IDEF1&l=EN-US&k=k(AS_CSHARPKEYWORD);k(SOLUTIONITEMSPROJECT);k(TargetFrameworkMoniker-%22.NETFRAMEWORK%2cVERSION%3dV4.0%22);k(DevLang-CSHARP)&rd=true" target="_blank
here , it says: "Note that the as operator only performs reference conversions and boxing conversions. The as operator cannot perform other conversions, such as user-defined conversions, which should instead be performed by using cast expressions".
What does that mean? Can someone show an example that demonstrates that sentence so that it shows the terms "reference conversions", "boxing conversions" and "user-defined conversions"?
-- <br/>
Werner
View the full article
In the documentation for the as operator http://msdn.microsoft.com/query/dev10.query?appId=Dev10IDEF1&l=EN-US&k=k(AS_CSHARPKEYWORD);k(SOLUTIONITEMSPROJECT);k(TargetFrameworkMoniker-%22.NETFRAMEWORK%2cVERSION%3dV4.0%22);k(DevLang-CSHARP)&rd=true" target="_blank
here , it says: "Note that the as operator only performs reference conversions and boxing conversions. The as operator cannot perform other conversions, such as user-defined conversions, which should instead be performed by using cast expressions".
What does that mean? Can someone show an example that demonstrates that sentence so that it shows the terms "reference conversions", "boxing conversions" and "user-defined conversions"?
-- <br/>
Werner
View the full article