ToUpper

  • Thread starter Thread starter Claudia Fong
  • Start date Start date
C

Claudia Fong

Hi,


I'm trying to convert a string into a Upper case; in the book said that
I need to use ToUpper(the string that I want to convert to upper case)
but it happens that C# "generate"
the error bellow:


The name 'ToUpper' does not exist in the class or namespace
'WindowsApplication1.frmsupplier'


Can someone tell me what's wrong and what is the correct "reserved word"
to convert a string into a upper case?


Cheers!

Claudi
 
Claudia said:
Hi,


I'm trying to convert a string into a Upper case; in the book said that
I need to use ToUpper(the string that I want to convert to upper case)
but it happens that C# "generate"
the error bellow:


The name 'ToUpper' does not exist in the class or namespace
'WindowsApplication1.frmsupplier'


Can someone tell me what's wrong and what is the correct "reserved word"
to convert a string into a upper case?


Cheers!

Claudi

string s = "abc";
console.writeline(s.ToUpper());

JB
 
Claudia Fong said:
I'm trying to convert a string into a Upper case; in the book said that
I need to use ToUpper(the string that I want to convert to upper case)
but it happens that C# "generate"
the error bellow:

The name 'ToUpper' does not exist in the class or namespace
'WindowsApplication1.frmsupplier'

Can someone tell me what's wrong and what is the correct "reserved word"
to convert a string into a upper case?

There isn't a reserved word - there's a method on the string class. You
need to call it *on* a particular string, not pass the string as a
parameter.
 
Back
Top