How to assign script as variable in C#

Sup,guys, can you help me to make a JS code like:

var LeftJoystick : Joystick;

in C#?) It will allow me to pick a object in inspector with Joystick script. Thx for attention :slight_smile:

public Joystick LeftJoystick;

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
    void Update() {
        ScriptName other;
        other = gameObject.GetComponent("ScriptName") as ScriptName;
        other.DoSomething();
        other.someVariable = 5;
    }
}