0

I made a chat that based from one that I found on the internet and I wanted to add emoji so I searched a set of emoji and found this: site
I downloaded all and added it to the resources of the project.

the images are all named in order. now my question how can I make an array or a hash table that contains them all?

I tried doing like that:

Properties.Resources._+count.ToString();
Falco Alexander
  • 3,092
  • 2
  • 20
  • 39
Tomer Peretz
  • 11
  • 1
  • 1

1 Answers1

0

Create a class with Image property and make collection of it to store the images.

    public class Emojis {

      public byte[] Image {get;set; }
    }

    var EmojiCollection = new List<Emojis> { 
        new Emojis { Image= new byte[] {}" }    // put image here
    }
Venkata Dorisala
  • 4,783
  • 7
  • 49
  • 90
  • This does neither answer the question on how to get all the images from `Properties.Resources` nor does it put them into a `Dictionary`, which would be appropriate (and requested by the OP). Also there is a `System.Drawing.Image` type for this. The resource manager returns them as such and there is no need to use `byte[]`. – Olivier Jacot-Descombes Jun 21 '16 at 15:28