microsoft / xlang

MIT License
877 stars 103 forks source link

Support extension methods #755

Closed JaiganeshKumaran closed 1 year ago

JaiganeshKumaran commented 3 years ago

C# and Microsoft Visual Basic support extension methods that let you add functionality to another class and use a familiar dotted style to access them. WinRT doesn't currently support them so you need to write a separate .NET library in addition to your WinRT component to expose them. Extension methods can be used as standard static methods so usage from languages that don't support extension methods such as C++ will be similar to calling a static method but for the languages that do support them, it can be used as extension methods. This could be implemented as an attribute as well which then can be used by CsWinRT to project it as an extension method.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 5 days.