TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mansoor
NA
66
6.4k
A new expression requires () or [] after type in C# code
Sep 28 2012 9:50 AM
Hi ,
I wrote below code, when i run this i got below issue: Plz guide me?
A new expression requires () or [] after type
Stack Trace
at System.Web.Compilation.AssemblyBuilder.Compile() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInterna........................
Code:
System.Web.UI.WebControls.
ListItem
Dept_Lstitem1 =
new
System.Web.UI.WebControls.
ListItem
();
string
deptcode="
3301000
";
List
<
string
> ASGforMembersServices_Deptcodes =
new
List
<
string
> {
"3300000"
,
"3301000"
,
"3302000"
,
"3303000"
,
"3304000"
,
"3305000"
,
"3306000"
,
"3307000"
,
"3308000"
};
if
(ASGforMembersServices_Deptcodes.Contains(deptcode))
{
ddl_ToDepartment.Items.Add(Dept_Lstitem1);
}
Reply
Answers (
1
)
validation problem
struggle at making time table for school