Click here to Skip to main content
15,881,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all.
I try to make a properties Image such as code:

C#
List<Image> _List=new List<Image>();
Public List<Image> List
{
   get
   {
       return _List;
   }
   set
   {
       _List=value;
   }
}


But seem it not work.
can you help me?
Thanks!
Posted
Updated 1-Aug-12 0:47am
v2

your example shows a List of Images, not an Image. To make an Image Property just write
public Image myImage {get; set;}
 
Share this answer
 
hi,
efkah is right.

Here List (actually it treates like this :
List<class> here class what ever it may be.)

for that you can set a Image property class for your required field(in you r case also Image ).

so do like this:

XML
List<MyImage> _List=new List<MyImage>();
Public Image  MyImage 
{
   get;
set;
   
}
 
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