How to Extract Properties for Refactoring
<p>I have this property</p>

<pre><code>public List&lt;PointK&gt; LineList
{get;set;}
</code></pre>

<p>Where <code>PointK</code> consists of the following structure:</p>

<pre><code>string Mark{get;set;}
double X{get;set;}
doible Y{get;set;}
</code></pre>

<p>Now, I have the following code:</p>

<pre><code>   private static Dictionary&lt;string , double &gt; GetY(List&lt;PointK&gt; points)
    {
        var invertedDictResult = new Dictionary&lt;string, double&gt;();
        foreach (var point in points)
        {
            if (!invertedDictResult.ContainsKey(point.Mark))
            {
                invertedDictResult.Add(point .Mark, Math.Round(point.Y, 4));
            }

        }

        return invertedDictResult;
    }


   private static Dictionary&lt;string , double &gt; GetX(List&lt;PointK&gt; points)
    {
        var invertedDictResult = new Dictionary&lt;string, double&gt;();
        foreach (var point in points)
        {
            if (!invertedDictResult.ContainsKey(point.Mark))
            {
                invertedDictResult.Add(point .Mark, Math.Round(point.X, 4));
            }

        }

        return invertedDictResult;
    }
</code></pre>

<p>How to restructure the above code?</p>
