what is the syntaxe of gameobjet?

I am tired of trying to use gameobject when I read that in some cases it is with a small cap and other times with a majuscule
can someone be brave enough to just tell me what is a correct syntax for my code here after?
thanks

private void ButtonDiamondW_OnClick(object source, ClickEventArgs e)
{
//Close();

//if( GameObject.bague.diamant_ba.renderer.enabled = true)
//{

//GameObject.bague.diamant_ba.renderer.enabled = false;
// GameTag = false;

if (GameObject.tag == “diamant_ba”) {

GameObject.renderer.enabled = false;

thisRender = true;
}
if (GameObject.tag == “diamant_ba”) {

GameObject.renderer.enabled = True;

thisRender = false;
}

When it is capitalized, it refers to a type. When it is non-capitalized, it refers to an instance.

For example:

GameObject testObject = new GameObject();

In this game, the first “GameObject” refers to a type.

In a collision, to deactivate something, I might have this (coll refers to the Collider):

coll.gameObject.active == false;

This would make the collider’s GameObject inactive.

Thank you very much for this clearing that syntaxic aspect.
Now from a button in a GUI menu, I want to hide and unhide an object that is tagged.
So id I understand I will have gameObject.damant_ba.hide ? if the state,or function hide exists.
I must have it wrong because looking at the red in the console this is not what is expected.

Without seeing the code, people will have a hard time guessing. It appears though, that you are not actually assigning the target and possibly not declaring it either.

We need the code to fully assist, but I can tell you that tag and renderer are using GameObject (class) still and not gameObject(reference).

I will not mention since when I am on that problem
Ok here is the code
I have tried so many things that effectively what is in it now may not register as “standard” but the lack of api description led me to explore everything I could think of and more..
I am coming from C++ but that should not be an excuse for mudding in that situation
Thank you for taking the time to explain if possible
You must know that the menu works but when I want to click on an item button I cannot select it in the view meaning activate it and deactivate the others.
I have no problem with the logic of on off but the syntax is so weird that it is out of logic for me

using System;
using UnityEngine;
using UnityForms;
using System.Collections;

sealed public partial class MainMenuFormBague : Form
{

private GameObject[ ] composants;
private SingleFormPanel PanelBague;
private Button ButtonDiamondW;
private Button ButtonDiamondT;
private Button ButtonDiamondR;
private Button ButtonPearl;
// private String GameTag;

private Button ButtonNewForm;

public override void Initialize()
{

Text = “Form Modal”;
Draggable = false;
WindowMode = FormBorderStyle.Window;
Size = new Size(280, 300);
// Location = FormsUtility.CenterScreen(this);
Location = new Point(-18,32);

//creates the panels that generates the controls
PanelBague = new SingleFormPanel(this);

AddPanel(PanelBague);

ButtonDiamondW = (Button)PanelBague.AddControl(new Button());
ButtonDiamondW.Text = “Diamant Blanc”;
ButtonDiamondW.Size = new Size(200, 45);
ButtonDiamondW.Location =
FormsUtility.AlignControl
(
Point.Zero, ButtonDiamondW,
HorizontalAlignment.Center, VerticalAlignment.Manual
);
ButtonDiamondW.ButtonClick += ButtonDiamondW_OnClick;

ButtonDiamondT = (Button)PanelBague.AddControl(new Button());
ButtonDiamondT.Text = “Emeraude”;
ButtonDiamondT.Size = new Size(200, 45);
ButtonDiamondT.Location =
FormsUtility.AlignControl
(
new Point(0, 50), ButtonDiamondT,
HorizontalAlignment.Center, VerticalAlignment.Manual
);
ButtonDiamondT.ButtonClick += ButtonDiamondT_OnClick;

ButtonPearl = (Button)PanelBague.AddControl(new Button());
ButtonPearl.Text = “Perle”;
ButtonPearl.Size = new Size(200,45);
ButtonPearl.Location =
FormsUtility.AlignControl
(
new Point(0, 100), ButtonPearl,
HorizontalAlignment.Center, VerticalAlignment.Manual
);
ButtonPearl.ButtonClick += ButtonPearl_OnClick;

ButtonDiamondR = (Button)PanelBague.AddControl(new Button());
ButtonDiamondR.Text = "Rubis ";
ButtonDiamondR.Size = new Size(200, 45);
ButtonDiamondR.Location =
FormsUtility.AlignControl
(
new Point(0, 150), ButtonDiamondR,
HorizontalAlignment.Center, VerticalAlignment.Manual
);
ButtonDiamondR.ButtonClick += ButtonDiamondR_OnClick;

//ButtonClose = (Button)PanelBague.AddControl(new Button());
//ButtonClose.Text = “Fermer”;
//ButtonClose.Size = new Size(200, 45);
//ButtonClose.Location =
// FormsUtility.AlignControl
// (
// new Point(0, 195), ButtonClose,
// HorizontalAlignment.Center, VerticalAlignment.Manual
// );
//ButtonClose.ButtonClick += ButtonClose_OnClick;

//ButtonNewForm = (Button)PanelBague.AddControl(new Button());
//ButtonNewForm.Text = “New Window”;
//ButtonNewForm.Size = new Size(200, 30);
//ButtonNewForm.Location =
// FormsUtility.AlignControl
// (
// new Point(0, 150), ButtonNewForm,
// HorizontalAlignment.Center, VerticalAlignment.Manual
// );
//ButtonNewForm.ButtonClick += ButtonNewForm_OnClick;

}

static var component : GameObject[ ];

private void ButtonDiamondW_OnClick(object source, ClickEventArgs e)
{

component = GameObject.FindGameObjectsWithTag(“bague”);

print("This is component " component[2]); // does not work too much red in the debugger

for(var j=0 ; j<component .length ; j++) {
component [j].active = false;
// deos not work either so many entries in the debugger
}

private void ButtonDiamondT_OnClick(object source, ClickEventArgs e)
{

}

private void ButtonPearl_OnClick(object source, ClickEventArgs e)
{

}

private void ButtonDiamondR_OnClick(object source, ClickEventArgs e)
{

}

}