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
Lars Persson
NA
110
0
Copy Object
Apr 11 2012 12:33 PM
I have List-control of objects.
I want find a certain object and save it away for later use.
To do this, I used a foreach-loop and tried to copy the object I found into a new object-variable.
Something like:
Book temporary = null; //Reference to Book-object
foreach (Book B in BookList)
if (txtBox1.Text.Equals(B.ID.ToString()))
temporary = B;
But that doesn´t seem to work.
How can I do this?
Reply
Answers (
5
)
Calculate Hours total in datagridview cells
Breakout, the paddle object wont display