C# Beginner to advanced - Lesson 68 - Nullable Types HD

28.06.2016
Nullable Types in C#: In C# Data types are divided in to 2 categories : Value types : includes int, float, double, enums etc.. Reference types : Interface, Class, String, arrays, Delegate etc. By default : Value types: are non Nullable. Reference types: are Nullable. How to make value types Nullable : Example : int i = 0 ; // default value in value types is zero. i is non Nullable . i cannot be set to null i = null ; // will generate a compile time error To make value type Nullable , we have to use “?”. int? j = 0 ; // now j can be nullable int. j = null ; // this works now. ankpro ankpro training Asp.net MVC C# C sharp Bangalore Rajajinagar Selenium Coded UI Mobile automation testing Mobile testing JQuery JavaScript .Net Components of the .Net framework Hello World Literal Keywords Variable Data types Operators Branching Loops Arrays ArrayList Strings String Builder Structures Enums Functions Classes Inheritance Polymorphism Properties Indexers Events Nested Classes Delegates Anonymous methods Labda expressions Abstract classes Exception Handling Linq Interfaces Extension methods Anonymous types Generics Collections Garbage Collection Reflection Attributes Input and output statements Type casting Partial Methods Partial Classes Boxing and Unboxing Var vs Dynamic vs Object using Static. Auto property initializer. Dictionary Initializer. nameof Expression. New way for Exception filters. await in catch and finally block. Null – Conditional Operator. Expression – Bodied Methods Easily format strings – String interpolation Parameterless constructors in structs. Creating a custom exceptions class.

Похожие видео

Показать еще