Hi
I have classes property and sketch in htis property will be linked to skecth class
and foure different classes which r linked to the skecth class
and two generic list one is for skecth and other is for data of type Object
when i run the program i iam grtting the error here
An unhandled exception of type 'System.StackOv erflowException ' occurred in mscorlib.dll
how can i slove this problem?
can any one help me in this
I have classes property and sketch in htis property will be linked to skecth class
and foure different classes which r linked to the skecth class
and two generic list one is for skecth and other is for data of type Object
when i run the program i iam grtting the error here
Code:
public Sketch FirstData()
{
// return Datas[Datas.Count];
foreach (Object data in Datas)
{
if (data is Door)
{
Door door = (Door)data;
}
if (data is Fixture)
{
Fixture fixture = (Fixture)data;
}
if (data is Wall)
{
Wall wall = (Wall)data;
}
if (data is Window)
{
Window window = (Window)data;
}
//return
}
return getSketch(1);
}
private Sketch getSketch(Int32 id)
{
foreach (Object data in Datas)
{
if (data is Door)
{
Door door = (Door)data;
door.Id = id;
}
if (data is Fixture)
{
Fixture fixture = (Fixture)data;
fixture.Id = id;
}
if (data is Wall)
{
Wall wall = (Wall)data;
wall.Id = id;
}
if (data is Window)
{
Window window = (Window)data;
window.Id = id;
}
}
return getSketch(id);
}
how can i slove this problem?
can any one help me in this
Comment