I have this object :
IEnumerable<string> m_oEnum = null;
and I'd like to initialize it. Tried with
IEnumerable<string> m_oEnum = new IEnumerable<string>() { "1", "2", "3"};
but it say "IEnumerable doesnt contain a method for add string. Any idea? Thanks
Ok, adding to the answers stated you might be also looking for
IEnumerable<string> m_oEnum = Enumerable.Empty<string>();
or
IEnumerable<string> m_oEnum = new string[]{};