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

Σωτηρης Σωτηρης 21 Reputation points
2022-06-08T00:36:02.647+00:00

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

.NET CLI
.NET CLI
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
322 questions
0 comments No comments
{count} votes