Click here to Skip to main content
16,017,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
private Image _picture;
public Image Picture
{
get
{
return _picture;
}
set
{
_picture = value;
}
}

where I've declared "using System.Drawing" at the top of the file. But it
won't accept it. In fact, Intellisense doesn't even recognize
"System.Drawing".

Is it not possible to declare a property as an Image type?


public Image Picture
{
get
{
return _picture;
}
set
{
_picture = value;
}
}

where I've declared "using System.Drawing" at the top of the file. But it
won't accept it. In fact, Intellisense doesn't even recognize
"System.Drawing".

Is it not possible to declare a property as an Image type?
Posted
Comments
Kornfeld Eliyahu Peter 19-Nov-13 1:56am    
Do you have REFERENCE to System.Drawing?

Check your references: have you included a reference to System.Drawing (in System.Drawing.dll)
 
Share this answer
 
Comments
praveen kadimi 19-Nov-13 5:00am    
Thanks
OriginalGriff 19-Nov-13 5:10am    
You're welcome!
The reason Intellisense is not showing System.Drawing is almost certainly related to the fact that your project ... when it was created ... did not have an active reference to that dll; or, somehow it has been deleted from the project's references.

Open the Solution Explorer in Visual Studio, open the References node in the treeview: if you don't see System.Drawing in the drop-down list of active project dll's, then right-click on References, select Add Reference, which will open the Reference Manager: find and add the System.Drawing.dll.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900