- Регистрация
- 09.02.2011
- Сообщения
- 1 216
- Благодарностей
- 683
- Баллы
- 113
I just recorded a template in CC and I'm getting an error when debugging. Here's the code.
It is telling me that I can't have document in document. Why would it record like that if it isn't right? Who built this thing?
Type Time Message
10:50:01 ActionGroup1.cs A local variable named 'document' cannot be declared in this scope because it would give a different meaning to 'document', which is already used in a 'parent or current' scope to denote something else. [Row 153; Column 22]
10:50:01 ActionGroup1.cs A local variable named 'document' cannot be declared in this scope because it would give a different meaning to 'document', which is already used in a 'parent or current' scope to denote something else. [Row 136; Column 22]
10:50:01 ActionGroup1.cs A local variable named 'document' cannot be declared in this scope because it would give a different meaning to 'document', which is already used in a 'parent or current' scope to denote something else. [Row 42; Column 22]
Код:
HtmlElement he = null;
Document[] document = instance.ActiveTab.AllDocuments.Documents;
foreach (Document document in document)
{
he = document.FindElementById("publicoton_home_submit");
if (!he.IsVoid && !he.IsNull) break;
Type Time Message
10:50:01 ActionGroup1.cs A local variable named 'document' cannot be declared in this scope because it would give a different meaning to 'document', which is already used in a 'parent or current' scope to denote something else. [Row 153; Column 22]
10:50:01 ActionGroup1.cs A local variable named 'document' cannot be declared in this scope because it would give a different meaning to 'document', which is already used in a 'parent or current' scope to denote something else. [Row 136; Column 22]
10:50:01 ActionGroup1.cs A local variable named 'document' cannot be declared in this scope because it would give a different meaning to 'document', which is already used in a 'parent or current' scope to denote something else. [Row 42; Column 22]