Skip to content

An expression tree may not contain an access of static abstract interface member #5997

Answered by KennethHoff
KillerBoogie asked this question in Q&A
Discussion options

You must be logged in to vote
var a = queryable.Select(x => Create<MyStatic>(x));

private static readonly Create<T>(T val) where T: IStatic
{
    return T.CreateThing(val);
}

class MyStatic : IStatic { ... }

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@imdbere
Comment options

@KennethHoff
Comment options

@KillerBoogie
Comment options

@KennethHoff
Comment options

Answer selected by KillerBoogie
@KillerBoogie
Comment options

@joepb
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants