Can't I just use all static methods?
- by Reddy S R
What's the difference between the two UpdateSubject methods below? I felt using static methods is better if you just want to operate on the entities. In which situations should I go with non-static methods?
public class Subject
{
public int Id {get; set;}
public string Name { get; set; }
public static bool UpdateSubject(Subject subject)
{
//Do something and return result
return true;
}
public bool UpdateSubject()
{
//Do something on 'this' and return result
return true;
}
}
I know I will be getting many kicks from the community for this really annoying question but I could not stop myself asking it.
Does this become impractical when dealing with inheritance?