Set Tag Of Instantiated Object

Hello Again. I Have Yet Another Question And I Have Looked All Over Google For It, But Could Not Find A Working Function. I Need To Set The Tag Of An Instantiated Object, And Have Tried:

var Example = Instantiate(ExampleTwo, new Vector3(0, 0, 0), Quaternion.identity);
Example.gameObject.tag = "Test";

Yet It Says

Assets/RoomGener.cs(27,34): error CS1061: Type UnityEngine.Object’ does not contain a definition for gameObject' and no extension method gameObject’ of type UnityEngine.Object' could be found (are you missing a using directive or an assembly reference?)

Ive Also Tried Example.tag = “Test”;, And It Still Says Compiler Error. Any Help Would Be Very Much Appreciated!

What is a type of ExampleTwo is this something which inherited from MonoBehaviour ?
try this

MonoBehaviour Example = Instantiate(ExampleTwo, new Vector3(0, 0, 0), Quaternion.identity);
Example.gameObject.tag = "Test";

or if you want to use var type, you can use it just once as

var Example = Instantiate(ExampleTwo, new Vector3(0, 0, 0), Quaternion.identity);
(Example as MonoBehaviour).gameObject.tag = "Test";

but much better approach to use exact type of your object.

Hi guys, I have a question.
What should “Example” and “ExampleTwo” be replaced by in your examples?
I have a script that instantiates objects, I want give these Objects a Tag. It’s not just 1 type of prefab that can get instantiated though, it’s a couple.
I’m assuming the “Example” is supposed to be replaced with your prefab’s name but when a number of them can spawn then that just doesn’t work does it?

Also “Identity” and “gameObject” don’t need to be replaced by anything right? That always gets me really confused, what is part of code and what should be replaced.

I hope someone can help me clear this up. ty

What I do wrong ? because I cant set tag on instantiate object

 for (int y = 1; y < 2; y++)
{
    for (int x = 0; x < 6; x++)
    {
        GameObject block = Instantiate(blocks, new Vector2(x, y), Quaternion.identity) as GameObject;
        GameObject positionOfNumber = block.transform.Find("PositionOfNumber").gameObject;
        GameObject blockWithNumber = Instantiate(numbers[x], positionOfNumber.transform.position, Quaternion.identity) as GameObject;
        blockWithNumber.gameObject.tag = x.ToString();
    }
}

}