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)
});
}
Related Topics
Privacy Policy, Terms and Conditions, DMCA Policy and Compliant
Copyright © 2018-2024 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.