Home | | C Sharp and .NET Framework(CNF) | C# Arrays program

Chapter: C# and .NET Framework

C# Arrays program

C# and .NET Framework

Arrays

class SomeClass

{

 

struct MyStruct

{

 

private readonly string label; private readonly int id;

 

public MyStruct (string label, int id)

{

 

this.label = label; this.id = id;

}

 

public string Label { get { return label; } } public string Id { get { return id; } }

 

}

 

static readonly IList<MyStruct> MyArray = new ReadOnlyCollection<MyStruct> (new[] {

 

new MyStruct ("a", 1), new MyStruct ("b", 5), new MyStruct ("q", 29)

});

 

}

 

Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail
C# and .NET Framework : C# Arrays program |


Privacy Policy, Terms and Conditions, DMCA Policy and Compliant

Copyright © 2018-2024 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.