I need an instance of class/model(for the purpose of accessing a non-static member) within my custom attribute.
public class LoginModel
{
[AutoComplete(currentInstance)] //pass instance of class or CompanyNames
public string DepartmentName { get; set; }
public string[] DepartmentNames { get {...} }
}
Is there a way to do this without using new()
or Reflection.