5
Answers

C# Errors.....Need Help!!

richard smith

richard smith

11y
1.1k
1
This is where the error is...(if you need to see more code let me know)
if (employeeID == "134")
{
oXL.Sheets[new string[2] { "134", "134_ManagerComments" }].Copy();

and the compiler is highlighting the [new string[2]] and telling me on new:
Identifier expected; 'new'is a keyword and on string
Expected class, delegate, enum, interface, or struct

How should this be ammended in order to remove these errors?

Answers (5)