Edit: delete the link as comments say it could not access without an account. Codes are from MS official course at edx:
public class CustomList<T>
{
public T this[int index] { get; set; } //Error
public void Add(T item)
{
// Method logic goes here.
}
public void Remove(T item)
{
// Method logic goes here.
}
}
Expected: no errors
Actual: Error: get must declare a body because it's not marked as abstract, extern, or partial.(CS0501)