- 1

What are the usual parameter names for the calling instance and the calling class?

21st Dec 2020, 8:56 AM
Megavath Mahipal
Megavath Mahipal - avatar
2 Antworten
+ 17
self and cls
6th Feb 2021, 2:19 PM
Jericho Siahaya
Jericho Siahaya - avatar
- 1
All calling methods should pass the instance based on an interface. In that interface you put the properties and methods you want to share. In that way you can call the 'same' method for every passed instance. public interface ISomeInterface { string Aa {get;} } public class A : ISomeInterface { public string Aa {get { return "a"; } } }
29th Dec 2020, 5:41 AM
Andrew