The goal is to list and count the number of null values that I have. It will be used to test some Linq code since I don't have a database. The fact is that no matter how I tried to define it, I get from my compiler: “Type or namespace name List1” could not be found. Are you missing the using directive or assembly references? (CS0246)]. "
List
early.
make sure you have:
using System.Collections.Generic;
then it should be as simple as:
List<double?> mylist = new List<double?>();
mcs? 1.1. " ". gmcs 2.0.
, using System.Collections.Generic; " "
With John Boker answer, you can do something like the following:
List<double?> mylist = new List<double?>(); int nullItemsCount = mylist.Count(item => !item.HasValue);
List<double?> l = new List<double?>();
Works for me ... The (Of T) list, like Nullable (Of T), is in System.Core do you have a link?