Book a Demo

Author Topic: C# Partial Method  (Read 5690 times)

RobMuir

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
C# Partial Method
« on: August 07, 2008, 02:23:28 am »
I am reverse engineering a C# code file and receive a parsing error "Unexpected symbol" at a partial method declaration

The code is as follows:

partial void OnCreated();

Any work arounds?

Thanks,

Rob

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: C# Partial Method
« Reply #1 on: August 07, 2008, 03:07:49 am »
That's C# 3.0, isn't it? AFAIK EA does not yet support it.

RobMuir

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: C# Partial Method
« Reply #2 on: August 07, 2008, 03:20:20 am »
Frank,

You are correct, it is C# 3.0 feature.

I have discovered that if I change it to a virtual method it will reverse engineer it although that does change the code.


«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: C# Partial Method
« Reply #3 on: August 07, 2008, 06:16:23 am »
Certainly does.

Didn't we see something a while back about (at least some) C# 3.0 support being a goal for a future release?
No, you can't have it!

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: C# Partial Method
« Reply #4 on: August 07, 2008, 04:39:10 pm »
Maybe, but there's not even full support for .Net 2.0 yet. Generalizations for generic classes are not being imported from assemblies, and support for modelling generic classes is incomplete.

http://www.ibm.com/developerworks/rational/library/08/0520_rajendra/index.html
shows what we could have.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: C# Partial Method
« Reply #5 on: August 19, 2008, 09:11:32 pm »
Valya,

I posted two possible solutions to this when I read your first post. Since then this post makes three!

I'll delete my earlier reply, and post it again when you've reduced your posts to one thread. That way the rest of us can see the entire thread in one place.

Hopefully the rest of the potential respondents will do the same.

I do suggest that you start a new thread - after you delete all copies of this post. That way we'll all know what the thread is talking about. This will also clean up the three (so far) threads you've posted to, so that they are each focused on one topic.

David
No, you can't have it!