- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
Block oneBlock = null;
for (int i = 0; i < this.ChildrenCount; i++)
{
Block block = this.GetChild(i);
if (!(block is PlaceToAddBlock)) //это проверка имеет ли объект тип PlaceToAddBlock
{
if (oneBlock == null)
{
oneBlock = block;
}
else
{
oneBlock = null;
break;
}
}
}
if (oneBlock != null)
{
return null;
}
guest 20.09.2013 05:56 # 0