Mark Object as static from Editor script

How can I mark the selected objects as static mesh from Unity’s Editor script?

ok… I just found out that I can access to isStatic variables in gameObject properties and it works now…

Here is the example code …

GameObject[] objects = Selection.gameObjects;
for (int i = 0; i < objects.Length; i++)
{
    objects*.gameObject.isStatic = true;*

}