Book a Demo

Author Topic: Generic Method Parameters  (Read 3142 times)

Carl

  • EA User
  • **
  • Posts: 24
  • Karma: +1/-0
    • View Profile
Generic Method Parameters
« on: May 08, 2020, 12:26:47 pm »
Hi,

How can I apply a generic to a method parameter?  I have a Template Parameter / Binding, but that doesn't show up in the Type dropdown when I define a method.

I'd like to capture a method like this where T is the Template Parameter and update() is a method in the same class.

    abstract public void update(T t);

Thanks,
Carl

Max H

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
    • SafeCode Consulting
Re: Generic Method Parameters
« Reply #1 on: May 14, 2020, 07:47:04 am »
I agree that it should show up in the dropdown, but you can just enter any type (including T) manually.