Skip to content

Prakash Tripathi's Blog

Tech Manager/Leader | MVP (Microsoft, C# Corner) | Speaker | Blogger | Mentor

  • About

Tag: AS

Direct Casting, IS and AS Operator in C#

Hello friends, Below are the available ways in C# when you cast one data type to another. Direct casting Direct cast is most common way of casting one type to another, however it yields exception if casting can’t be done. Below is the example to demonstrate the same. object length = 3.2; int test = (int)length; //Fails in… Continue reading Direct Casting, IS and AS Operator in C#

Published November 25, 2018
Categorized as .NET/C# Tagged AS, IS

Recent Posts

  • String Reversal In Several Ways Using C#
  • Ranges and indices in C# 8.0
  • Default Interface Implementation in C# 8.0
  • Store Multiple NULL values with unique data in SQL Server
  • Enable CORS in ASP.NET Core Web API

Recent Comments

  • Charley on Design Patterns What, Why?
  • Gameroe's Gaming Hardware on Design Patterns What, Why?

Categories

  • .NET/C# (8)
  • ADO.NET/EF (2)
  • Algorithm (3)
  • ASP.NET/MVC/WebAPI (2)
  • Design/Architecture (10)
  • SQL Server/SSIS/SSRS (2)
  • Threading (1)
  • WinForm/WPF (1)

Archives

  • April 2021
  • September 2019
  • August 2019
  • July 2019
  • April 2019
  • March 2019
  • January 2019
  • December 2018
  • November 2018

Meta

  • Register
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
  • LinkedIn
  • Twitter
Prakash Tripathi's Blog
Privacy Policy
Proudly powered by WordPress.