While working with var in c#, if you need to initialize var, it can be simply done by the following:
If we will run the above code snippet, the following error will occur.
![error]()
Image 1.
So to solve this use initialize your var as in the following screenshot.
As you can in the following, we will store a List in var:
![List]()
Image 2.
It depends what you want to store in your list. Use the following if you want string:
- string y = null;
- var qq = y;