Untitled
unknown
actionscript
2 years ago
528 B
8
Indexable
namespace Test
{
class Program
{
public static void Main(string[] args)
{
var Maria = new Data();
Maria.Name = "Maria";
var student = new Student();
student.data.Add(Maria); //warning CS8602: Dereference of a possibly null reference.
System.Console.WriteLine(Maria.Name);
}
}
class Student
{
public List<Data>? data { get; set; }
}
class Data
{
public string? Name { get; set; }
}
}Editor is loading...