Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Extension methods with .NET Micro Framework

It seems that extensions methods are not supported/working with the .NET Micro Framework.

Is there any way to get this usefull language feature working?

like image 687
Martin Buberl Avatar asked Dec 06 '25 06:12

Martin Buberl


1 Answers

When you add the ExtensionAttribute class to your project you can use extension methods also in the .NET Micro Framework.

namespace System.Runtime.CompilerServices
{
    [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method)]
    public sealed class ExtensionAttribute : Attribute { }
}
like image 127
Martin Buberl Avatar answered Dec 07 '25 19:12

Martin Buberl



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!