Book a Demo

Author Topic: How can I get the operations from a class?  (Read 2860 times)

marine1981

  • EA User
  • **
  • Posts: 58
  • Karma: +0/-0
    • View Profile
How can I get the operations from a class?
« on: February 16, 2011, 08:51:18 pm »
Hello,
How can I get the "Operations" (Methods)/"Attributes" by name from a "Class"? I use JScript/C#.

Thanks
« Last Edit: February 16, 2011, 08:59:02 pm by marine1981 »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How can I get the operations from a class?
« Reply #1 on: February 16, 2011, 09:45:00 pm »
Something like:
Code: [Select]
EA.Method myOperation;
foreach (EA.Method operation in myElement.Methods)
{
    if (operation.Name == "searchString")
        myOperation = operation;
}

Geert