The name 'Flashlight' doesn't exist in the current context

I’m using Visual Studio 2010 Pro to write some script for a horror game that I am making, but when I try to enter the word “Flashlight” in Flashlight.BatteryLife, Flashlight is underlined in red saying that it doesn’t exist in the current context. The word “Flashlight” should be a light blue when I add a period after it. I’ll post my code. Please help!

using UnityEngine;
using System.Collections;

public class HUD : MonoBehaviour
{
    public static int BatteryCount;
    public static bool HasFlashlight;

    void OnGUI()
    {
        if (HasFlashlight)
        {
           GUI.Label(new Rect(10, 10, 80, 30), "Flashlight");
           GUI.Label(new Rect(70, 10, 80, 30), Flashlight.BatteryLife.ToString("F2"));        
        
        }
    }
}

You need a script Flashlight.cs attached to some object in scene. Also, variable BatteryLife must be global. See Unity Variable Reference for more information.

BTW, i have also tried using VS to make Unity scripts, but i think it’s better to use MonoDevelop.