Extension methods with .NET Micro Framework
Asked Answered
C

1

3

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?

Centrosome answered 15/1, 2013 at 18:44 Comment(0)
C
3

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 { }
}
Centrosome answered 15/1, 2013 at 18:44 Comment(1)
To be more precise, extension methods are a compiler feature that merely relies on the existence of this attribute.Stenographer

© 2022 - 2024 — McMap. All rights reserved.