Hello ,
Is it possible to define a member function outside Class body in C# like we do in C++?
Thanks in advance.
$and!p
Hello ,
Is it possible to define a member function outside Class body in C# like we do in C++?
Thanks in advance.
$and!p
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
AlanRank #669 · 3.6K reputationPosted Dec 11, 2007, 3:29 AM EST
No, in C#, every method has to be declared inside either a class or struct.
SANDIP18 reputationPosted Dec 11, 2007, 3:47 AM EST