✅ ternary select between static classes

i have two static classes like this
public static class WhitePieces
{
...
}
public static class BlackPieces
{
...
}
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;
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
'WhitePieces' is a type, which is not valid in the given context
why is that?
1 Reply
it’s raining outside
nvm turns out you cant assign classes to variables
Want results from more Discord servers?
Add your server