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
Kay
NA
4
0
Pointing Problems
Aug 31 2009 3:53 PM
private void button1_Click(object sender, EventArgs e) { Card Card1 = new Card(); Card Card2 = new Card(); Card1.Value = 3; Card1.Suit = 3; Card2 = Card1; Card2.Suit = 2; } public class Card { public int Suit; public int Value; public Card() { Suit = 0; Value = 0; } } I step through the Button1 code and any changes on Card2 are updated across to Card1 like they were the same or if card2 were simply pointing to card1. What have I done wrong? THanks
Reply
Answers (
3
)
Senior Architect to build groundbreaking .NET Platform (C#/3.5/WCF/SOA/Agile/TDD) in SF, CA
Invitation to Djungla - next generation marketplace for web development