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
S J
NA
171
25.5k
PaintEventArgs e showing null reference
Nov 26 2020 5:17 AM
hi
public
void
Paint(PaintEventArgs e)
//here e is showing null reference in class {"Object reference not set to an instance of an object."}//
{
//Graphics g = e.Graphics;
e.Graphics.DrawRectangle(pen1, rect);
}
how to avoid this I need to draw a rectangle by using class method but when I call paint method showing null reference exception.
Reply
Answers (
4
)
Error two rectangles intersection same location and size in c#
When C# allows to set string as null then why nullable string is intro