Get the CDT index from the list of CDTs

Hi,

I have the list of CDTs:

{

CDT(id: 1, name: "SomeName1"),

CDT(id: 2, name: "SomeName1"),

CDT(id: 3, name: "SomeName1"),

CDT(id: 4, name: "SomeName1")

}

How can I find an index of the CDT, that have id=4?

Thanks

  Discussion posts and replies are publicly visible