C#C
C#17mo ago
axo

✅ ternary select between static classes

i have two static classes like this
public static class WhitePieces
{
    ...
}
public static class BlackPieces
{
    ...
}


and i'm trying to select between them like this
var pieceClass = sideAttacking == Colour.White ? WhitePieces : BlackPieces;


and i'm getting this error:
'WhitePieces' is a type, which is not valid in the given context


why is that?
Was this page helpful?