Access field from class where list belong to
<p>let say i have following class:</p>

<pre><code>class Shape
{
    public int widht;

    public List&lt;Point&gt; points;
}
</code></pre>

<p>and in class Point i want to use this widht property from class Shape, so if "point" belong to that list i wish to have possibility to use "container" properties. I also want to serialize then class Shape so I don't think i can use constructor with parameters. </p>

<p>Edit:
I will say how it looks like in my app:
i have class Device</p>

<pre><code>class Device
{
string connection;
List&lt;Task&gt; tasks;
}
</code></pre>

<p>and Task </p>

<pre><code>class Task
{
  void DoTask()
  {
     and here i need the connection
  }
}
</code></pre>

<p>so i just like to do it then foreach(task in task) task.DoTask() but i have to pass additional "this" like task.DoTask(this) or the connection where i think that i should have acces of my container if it allows me.</p>
