Monica Shiralkar wrote:Why is it poor form? Is it because it is not written as below?
Yes, that would have been the correct way to do it in Java if you had declared the field as private. In C#, the correct way is:
Note the following differences:
C# uses IList instead of List.C# uses List instead of ArrayList.In C# you write built-in reference types (like object and string) with a lowercase letter.C# doesn't support generic type inference for constructor calls; there's nothing similar to the diamond operator in Java.
Private fields should be written with a lowercase letter. I don't know what the convention is for internal, protected or public fields, but it doesn't matter: Fields should be private. The default visibility in C# for fields is private, but it's better to state it explicitly.