Skip to content
Discussion options

You must be logged in to vote

As nobody stated, I can already do that with # directives:

//#define LIMITED_INTERFACES //Uncomment to activate limited-scope interfaces
System.Console.WriteLine(((IDataYesExposedField)new LibraryExportData()).Yes);

public abstract class MyAbstractExposedClass
{}
interface IDataYesExposedField
{ string? Yes { get; set; } }
interface IDataNoExposedField
{ string? No { get;set; } }
interface ILibraryApiFields
{
    string? Yes { get; set; }
    string? No { get;set; }
}
public class LibraryExportData :
#if LIMITED_INTERFACES
MyAbstractExposedClass, IDataYesExposedField, IDataNoExposedField,
#endif
ILibraryApiFields
{
    public string? Yes { get; set; }
    public string? No { get; set; }
}

Replies: 5 comments 13 replies

Comment options

You must be logged in to vote
1 reply
@Richiban
Comment options

Comment options

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

@HaloFour
Comment options

@Daynvheur
Comment options

@HaloFour
Comment options

@Daynvheur
Comment options

Comment options

You must be logged in to vote
4 replies
@Daynvheur
Comment options

@Daynvheur
Comment options

@tacosontitan
Comment options

@Daynvheur
Comment options

Comment options

You must be logged in to vote
1 reply
@Daynvheur
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Daynvheur
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
6 participants