In this case i Want to print
m2k:
salt:2
skill:
is there a way to do that?
to somehow get the name of the object that we are using
namespace practice
{
class SmashPlayer
{
private int salt, skill;
public SmashPlayer(int salt, int skill)
{
this.salt = salt;
this.skill = skill;
}
public void print()
{
Console.WriteLine("{0}'s\nsalt:{1}\nskill:{2}",Name of object,salt,skill);
}
}
class Program
{
public static void Main(string[] arg)
{
SmashPlayer m2k = new SmashPlayer(2,5);
m2k.print();
}
}
}