keyword overwrite

  • Thread starter Thread starter Urs Vogel
  • Start date Start date
U

Urs Vogel

Hi

For compatibilty reasons with an older system, I need to have a method
called string()
..
In VB.Net I may use [keyword] names for my own functions, such as

Public Function [String](ByVal s as String) as String
.....

In C#,

public string string(string s) // function must have the name string

of course won't work. Any hints of how to solve this problem?

Thanks,
Urs
 
Hi

For compatibilty reasons with an older system, I need to have a
method called string()
.
In VB.Net I may use [keyword] names for my own functions, such
as

Public Function [String](ByVal s as String) as String
....

In C#,

public string string(string s) // function must have the name
string

of course won't work. Any hints of how to solve this problem?

Urs,

Preface the identifier with the @ symbol:

public string @string(string s)

Hope this helps.

Chris.
 
Chris, that's exactly it, perfect, thanks.

Chris R. Timmons said:
Hi

For compatibilty reasons with an older system, I need to have a
method called string()
.
In VB.Net I may use [keyword] names for my own functions, such
as

Public Function [String](ByVal s as String) as String
....

In C#,

public string string(string s) // function must have the name
string

of course won't work. Any hints of how to solve this problem?

Urs,

Preface the identifier with the @ symbol:

public string @string(string s)

Hope this helps.

Chris.
 
Back
Top