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
Marty Habicht
NA
3
1.4k
Dictionary with a Point!!
Mar 15 2012 2:56 PM
Hi all,
I hope someone can help me out!! I'm fairly new to C#.
I've established a dictionary:
Dictionary
<
string
,
Point
> addPositionDict =
new
Dictionary
<
string
,
Point
>();
I initialized the dictionary:
Point
addPoint =
new
Point
();
addPoint.X = 0;
addPoint.Y = 0;
and added my points with their given names:
addPositionDict.Add(name_Out, addPoint);
Now knowing their names, I want to update their positions and I tried like so:
addPositionDict[nameOut].X = x_matrix;
However there is an error which I can't understand:
"Cannot modify the return value of 'System.Collections.Generic.Dictionary<string, System.Drawing.Point>.this[string]' because it is not a variable"
What am I doing wrong? what exactly is not a variable? Again, Take it easy on the language "jargon" -- I'm fairly new to C#.
Reply
Answers (
2
)
Send XML message to Peoplesoft
using Ctrl for mnemonics instead of Alt