How to read value from Ini file?

Hello. I am trying to read value from Ini file, but i can do this.

I using this code:

using UnityEngine;
using System.Collections;
using Ini;

public class ReadValue : MonoBehaviour {
public IniFile myini;
    // Use this for initialization
    void Start () {
    myini = new IniFile("Settings.ini");
    }
    // Update is called once per frame
  
        void read()
{
string time = myini.IniReadValue("Settings","gametime");
}

public float time1 = time;
	
  void Update () {
		
		Debug.Log(time1);
    }
 


}

But i have error:
Assets/ReadValue.cs(18,22): error CS0103: The name `time’ does not exist in the current context.
How can I handle with this?

You declared “time” locally in the method read so it’s invisible outside that method.

Also, you’re globally initializing time1 to time, which at this point (i.e., script startup) would still be unassigned, even if it were declared.