I am very new/ a beginner to coding. I'm using c# 6.0 in Microsoft Visual studio 2022.
I'm trying to create some sort of search function, but perhaps there is a better way to do it.
I created a class(didn't include all of the code bc of space) and gave it
public void Attributes()
{
Console.WriteLine(affinity + ", " + aoe + ", " + effect + ", " + pointOfOrigin);
}
and assigned variables in the main program/code like this
Spell FireBall = new Spell("Fire", "Sphere", "Explosion", "Thrown");
What I want to happen is to type the spell name(ex: Fireball) and then have it return the: Fire, Sphere, Explosion, Thrown.
I know that if you type FireBall.Attributes(); it will return the attributes, but I cannot figure out how to take user input to call the attributes. My first guess is that it has something to do with Console.ReadLine and assigning a variable to it but everything I've tried just turned errors.
As I said I'm a beginner and any help is much appreciated. I also apologize if I'm not being specific enough or used the wrong terms, as I'm still learning all of the vocabulary for the different stuff. I'm having a lot of fun learning, so please be nice.