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
Guest User
Tech Writer
357
120.8k
Why do I need to instantiate object?
Jun 6 2012 5:53 PM
Hi
I have the following code:-
IOrderedDictionary rowValues = new IOrderedDictionary();
rowValues = GetValues(GridView1.Rows[i]);
CheckBox cbRemove = new CheckBox();
cbRemove = (CheckBox)GridView1.Rows[i].FindControl("Remove");
My question is why do I need to create a instance\object of the IOrderedDictionary and CheckBox classes?
I changed the code to
IOrderedDictionary rowValues;
rowValues = GetValues(GridView1.Rows[i]);
CheckBox cbRemove;
cbRemove = (CheckBox)GridView1.Rows[i].FindControl("Remove");
And found that it still works at both compile and runtime?
Regards
Steven
Reply
Answers (
4
)
Problem Marshalling struct from C# to C++ void*
entity framework cast back to objectcontex