if statement as Attribute??

Hello, I am quite new to creating Custom Classes. I would like to know if I can use the if statement as part of the Function call.

If it makes sense this is what I would like to do:
public class Token

public Token(TokenType tokenType, string tokenName, string description, int cost, int armor, int hp, int damage, int moveSpeed, int attackRange){
...some code...
}

Public Token(if(TokenType tokenType==tokenType.Place), string tokenName, string description){
...Rest of the code...
}

is it possible to do or do I have to find a different way to do this?

No you can’t use a conditional as a parameter, only variables, using a conditional has to be in a code block. Also a conditional has to have a statement to go with it, you are trying to ask if this object type == whatever and then not saying what happens if if the statement is true.

This is how a conditional works, you let’s say you have an animals and if an animal is a dog, then you give it a bone.

if(animal==dog)

give(bone);

A conditional asks for a condition and if it is met then there are instructions to follow, what you have is this:

if(animal==dog)

but then you don’t tell it what to do if it is an animal… What are you trying to accomplish with the if statement?

You have to put the statement in the method, or in this case constructor. But still you have to tell it what to do if it’s whatever type.

Public Token(TokenType tokenType, string tokenName, string description){

if(TokenType tokenType==tokenType.Place)

…what you want it to do if it is tokenType.Place

}