title: How to call a class that is created by other function?
body: <p>I am learning C# as Godot Engine require it. How should I call an object (class) that is created by other function?</p>
  <p>Here is my code structure:</p>
  <pre><code>public class ExampleClass //A random class()
  {                         //I heard that I need to set a field for 
     float data;            //other function, How should i do it?
     
     public void SetData(float setData){ //Method in the class
     data = setData;
     }
     ...   // other syntax in class
  } 
  
  
  public void main (){
    float dataStorage;
    ExampleClass Class = new ExampleClass (); //Create new object
    Class.setData(1.0f);
    dataStorage = returnData(); // Call function that return the class 
                                // which is called by main
  }
  
  public float returnData (){
    float getData;
    //How should I the call object that is created by main??
    return getData; 
  } 
  </code></pre>
  <p>In short, I would like to know what should I do in order to call the class that is created by other function, thank you!!</p>