How do I reference a function's variable from another class? - C#
<p>I am having a hell of a time getting a variable from the function of another class usable in my Game1 (main) class. Specifically, I want to take width and height from the function SaveData in SetWindowSize.cs and use it in ReadSettings in Game1.cs.</p>

<p>I get the error </p>

<blockquote>
  <p>'ShovelShovel.SetWindowSize' does not contain a definition for
  'height'. Same for 'width'.</p>
</blockquote>

<p>Game1.cs (the function only)</p>

<pre><code>protected void ReadSettings()
{
    try
    {
        if (File.Exists(SetWindowSize.savePath))
        {
            using (FileStream fileStream = new FileStream(SetWindowSize.savePath,
                                                          FileMode.Open))
            {
                using (BinaryReader binaryReader = new BinaryReader(fileStream))
                {
                    SetWindowSize.width = binaryReader.ReadInt32();
                    SetWindowSize.height = binaryReader.ReadInt32();
                }
            }
        }
    }
    catch
    {
    }
}
</code></pre>

<p>SetWindowSize.cs</p>

<pre><code>namespace ShovelShovel
{
            protected void ReadSettings()
    {
        try
        {
            if (File.Exists(savePath))
            {
                using (FileStream fileStream = new FileStream(savePath, FileMode.Open))
                {
                    using (BinaryReader binaryReader = new BinaryReader(fileStream))
                    {
                        var windowSize = WindowSizeStorage.ReadSettings();

                        WindowSize.Width = windowSize.Width;
                        WindowSize.Height = windowSize.Height;
                    }
                }
            }
        }
        catch
        {
        }
    }
</code></pre>

<p>Thank you so much to anyone and everyone that can help me, I really appreciate it.</p>
