question

24679792 avatar image
0 Votes"
24679792 asked

How to translate Generic::List<T> in C++/CLI from C#?

Hello. how to translate this code to C++CLI?
Here code from c#

         public Chip GetChip(string type, string manufacturer, string name)
         {
             return _ChipList.Find(c => (c.GetType().Name == type) && (c.Manufacturer == manufacturer) && (c.Name == name));
         }
 .....
 /**************************************************************
        public ChipSettings()
         {
             _ChipList = new List<Chip>();
         }

I have tried in c++cli but nothing

 Chip^ ChipSettings::GetChip(String^ type, String^ manufacturer, String^ name)
 {
     return _ChipList->Find(c = > (c->GetType()->Name == type) && (c->Manufacturer == manufacturer) && (c->Name == name)); // error
 }
 //and the header file
  private: List<Chip^>^ _ChipList = nullptr;

any help pls ..
ty








dotnet-cli
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers