What is the difference between as and is operators in c#?
Answer / Hemendra Singh
The 'as' operator attempts to perform an implicit conversion between objects of different types and returns null if the conversion fails. The 'is' operator checks whether an object is an instance of a specific type or implements a specific interface without performing any conversion. If it does, it returns true; otherwise, it returns false.
| Is This Answer Correct ? | 0 Yes | 0 No |
Is lazy t thread safe?
what's the Difference between DataView and DataTable?
What are the Types of assemblies that can be created in dotnet
What is asp net in c#?
What is using in c#?
Define delegation in .net?
Why singleton class is sealed in c#?
Explain dataset.acceptchanges method in .net?
Can you create an instance of a static class?
What is iqueryable?
To catch any possible exception What is the C# syntax written ?
What is the purpose of namespace in c#?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)