How to make a JavaScript a C# script

Hi, i have a question. how can i convert a JavaScript (or UnityScript for the community)
to a C# script. This is the code i use to make my floor.

var block : GameObject;

//Change to adjust the lenght = x and z
var worldWidth : uint  = 20; 
var worldHeight : uint  = 20;

function Start () {
 
CreateWorld();
  
}
  
function Update () {
}
 
function CreateWorld() {
   
    //Space between each block (x)
        for(var x : uint =0; x<worldWidth; x+=1) {
       
       
     //Space between each block (z)
         for(var z : uint =0; z<worldHeight; z+=1) {
         
 
         
          var block = Instantiate(block);
          block.transform.position = new Vector3(this.transform.position.x + x, this.transform.position.y, this.transform.position.z + z);
   
         
         
          }       
          }    
          }

So, what do i have to change in the script to let this script to be a C#.
I use this script to create a 20 by 20 grid out of cubes. But i wish to have this script to be C#, because some people said to me that C# runs faster most of the time.

And how do i add it so i can change the Width from x and z in the inspector?

Thanks for reading all this and i hope you can help me out.

Well you can use this tool :

http://www.m2h.nl/files/js_to_c.php

It is for converting UnityScript to C#. It can only convert to a certain extent. You will
probably find errors in the converted script. When you have converted, you need to
manually edit the errors.

For you script this is the converted c# script. :

// Converted from UnityScript to C# at http://www.M2H.nl/files/js_to_c.php - by Mike Hergaarden
// Do test the code! You usually need to change a few small bits.

using UnityEngine;
using System.Collections;

public class MYCLASSNAME : MonoBehaviour {
GameObject block;
 
//Change to adjust the lenght = x and z
uint worldWidth  = 20; 
uint worldHeight  = 20;
 
void  Start (){
 
CreateWorld();
 
}
 
void  Update (){
}
 
void  CreateWorld (){
 
    //Space between each block (x)
        for(uint x =0; x<worldWidth; x+=1) {
 
 
     //Space between each block (z)
         for(uint z =0; z<worldHeight; z+=1) {
 
 
 
          FIXME_VAR_TYPE block= Instantiate(block);
          block.transform.position = new Vector3(this.transform.position.x + x, this.transform.position.y, this.transform.position.z + z);
 
 
 
          }       
          }    
          }
}