While working with var in c#, if you need to initialize var, it can be simply done by the following:
- var qq=null;

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:

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;

Join the conversation! Your thoughts help the community grow.