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
Catalin KokoTz
NA
8
718
NumericUpDown List and Button List . How to link them ?
Mar 14 2018 12:24 PM
Hello ,
I have a List of Buttons and a List of NumericUpDown.
numUpDnList =
new
List();
btnList =
new
List();
for
(
int
i = 0; i < maxv; i++)
{
Button btn =
new
Button();
btn.Location =
new
Point(121, 275 + i * 19);
this
.Controls.Add(btn);
btnList.Add(btn);
NumericUpDown numUpDn =
new
NumericUpDown();
numUpDn.Location =
new
System.Drawing.Point(120, 275 + i * 19);
// numUpDn.Size = new System.Drawing.Size(50, 20);
this
.Controls.Add(numUpDn);
numUpDnList.Add(numUpDn);
}
I want to: btnList[i].Click += (se, ev) => { numUpDnList[i].UpButton(); }
But it doesn't work :
" System.ArgumentOutOfRangeException: 'Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index' "
Reply
Answers (
3
)
The process cannot access the file
How do I add double variables to a array of doubles?