 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Null List in C#
A null list exists in C#. To check whether a list is null or not, check them against the null literal. Set a null like this −
List<string> myList = null;
Now, to check for null, use the equality operator −
myList == null;
The following is an example −
Example
using System; using System.Collections.Generic; using System.Linq; public class Demo {    public static void Main() {       List<string> myList = null;       // checking for null       Console.WriteLine(myList == null);    } }  Output
True
Advertisements
 