473,406 Members | 2,633 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

ToUpper



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

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #1
4 7572
Claudia Fong wrote:

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

*** Sent via Developersdex http://www.developersdex.com ***


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

JB
Nov 17 '05 #2
Claudia Fong wrote:

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

*** Sent via Developersdex http://www.developersdex.com ***


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

JB
Nov 17 '05 #3
Claudia Fong <cd********@yahoo.co.uk> wrote:
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.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #4
Claudia Fong <cd********@yahoo.co.uk> wrote:
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.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Kerri | last post by:
Hi, I have a string 'hello world' I can UCase my string using String.ToUpper Is there anyway to just UCase the first letter ofe ach word? Thanks,
2
by: JasBascom | last post by:
if i have struct crecord{ char record_type; } if record_type = 'c'; how do I make record_type toupper?
7
by: Duane | last post by:
Aside from the pitfalls of using this function, according to the standard, what is the correct way to call it? #include <string> #include <locale> // seems to work with BCC5.6/STLPort...
18
by: didgerman | last post by:
Chaps, I need to properly format the case of a struct. Can I just hit it with tolower, and then 'while (string ==' ') pos++; string=toupper(string); to add in the higher case for the start of...
3
by: gelbeiche | last post by:
I have a question regarding the following small C program. #include <locale.h> int main() { char* loc = 0; char before,after; int i;
0
by: Shrinivas Reddy | last post by:
Hi, I am using the ToUpper() function in an FXCop rule which checks whether a boolean variable has "is" or "has" as the prefix. The ToUpper() function does not work. When I put the expression...
48
by: Frederick Gotham | last post by:
The "toupper" function takes an int as an argument. That's not too irrational given that a character literal is of type "int" in C. (Although why it isn't of type "char" escapes me... ) The...
4
by: sandy | last post by:
I am trying to upper case a string, so I have this method: string FileSystem::toupper(string S) { for (int i=0; i<S.length(); ++i) { S=toupper(S); } return S;
13
by: JanWhitney | last post by:
I am learning C++, so please be kind. Is there anywhere that I can view the source code for the toUpper function? Thanks.
16
by: gaga | last post by:
my function should accept a pointer to a string as its argument. and it should convert each charater to an uppercase letter. I know what i need to do, its just my syntax is all out of whack. ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.