title: How to return Struct From Function in C#?
body: <p>I defined a struct like this : </p>
  
  <pre><code> public struct Averages
      {
          public decimal Sell_GoldOunce = 0;
          public decimal Buy_GoldOunce = 0;
          public decimal Sell_SilverOunce = 0;
          public decimal Buy_SilverOunce = 0;
          public int Sell_Mazene = 0;
          public int Buy_Mazene = 0;
          public int Sell_Gram_18 = 0;
          public int Buy_Gram_18 = 0;
          public int Sell_Gram_24 = 0;
          public int Buy_Gram_24 = 0;
      };
  </code></pre>
  
  <p>Now i Want to Use it in my Function And Then RETURN IT</p>
  
  <pre><code>    public (?) AssignValues()// I WANT TO KNOW WHAT SHOULD I PUT INSTITE OF (?)
      {
          Averages GoldValues;
          GoldValues.Sell_GoldOunce = somevalue;
          GoldValues.Buy_GoldOunce = somevalue;
          GoldValues.Sell_SilverOunce = somevalue;
          GoldValues.Buy_SilverOunce = somevalue;
          GoldValues.Sell_Mazene = somevalue;
          GoldValues.Buy_Mazene = somevalue;
          GoldValues.Sell_Gram_24 = somevalue;
          GoldValues.Buy_Gram_24 = somevalue;
          GoldValues.Sell_Gram_18 = somevalue;
          GoldValues.Buy_Gram_18 = somevalue;
  
          return GoldValues;
      }
  </code></pre>
  
  <p>as i said i want to know what kind i should define my function to can return struct</p>