C# function best practice

Using parameters instead of class-level member variables makes your method more testable and portable/reusable. If that’s something you’re concerned about, method parameters might be more appealing.

2 Likes