aspnet-core-3-role-based-authorization-api icon indicating copy to clipboard operation
aspnet-core-3-role-based-authorization-api copied to clipboard

c# question

Open medmelek opened this issue 6 years ago • 1 comments

ps: am new in c# in userServices.cs file : 1/ how can user object use methode (withoutPassword) that she's not decalred in his class 2/ if a static methode with xModel type, can be used as a methode for all xModel instance object ?

medmelek avatar Nov 16 '19 23:11 medmelek

1/ how can user object use methode (withoutPassword) that she's not decalred in his class It's an extension method defined on Class "User", note "this User" in the method signature 2/ if a static methode with xModel type, can be used as a methode for all xModel instance object ? Yes, I think so, depending on accessibility, static methods also can be invoked from outside...

zfxsss avatar Aug 23 '20 13:08 zfxsss