Book a Demo

Author Topic: create get and set in C#  (Read 3133 times)

christof.k

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
create get and set in C#
« on: May 19, 2006, 06:31:26 am »
Hi!

I'm currently having trouble letting EA produce a get and set function routines like

public int GetCounter
{
   get
   {
      return Counter;
   }
}

I did add an operation marked with the stereotype property with the right return type but that seems not to be the solution.

Can somebody advise how to get this realized?

Thanks in advance
Christof



Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: create get and set in C#
« Reply #1 on: May 21, 2006, 03:38:50 pm »
You'll also need to add a tagged value "readonly" or "writeonly".  The easiest way to set this up is to open the attributes dialog, select Counter and check the property checkbox.