473,320 Members | 1,535 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,320 software developers and data experts.

C#NET2008 Upper case and Lower case Character

126 100+
Hullo Awesome Helpers,
Thank you for helping me earlier.
I am back with new problem. I am trying to covert a TEXT String into either Lower and Upper case characterS. (Upper case Eg. ALFRED instead of alfred)
(Lower case Eg. thompson instead of THOMPSON )

Please help me.

Coding
//convert to lower case
string strName = lcase(this.txtName.text) <-- not working

//convert country to Upper case
string strCountry =ucase(this.textCountry.text)<-not work

Thank you for your help.

Cheers,
Lennie
Oct 26 '10 #1
6 3103
GaryTexmo
1,501 Expert 1GB
http://msdn.microsoft.com/en-us/libr...=VS.71%29.aspx

Have a look there. The ToUpper and ToLower methods on a string are what you're looking for. The MSDN reference is great for people just learning the framework, just do a search on the object you're using :)
Oct 26 '10 #2
lenniekuah
126 100+
After view the MSDN Website
I convert this coding that I posted earlier to this structure;

//convert country to Upper case
string strCountry = Uppercase(this.textCountry.text)

And it generates this error message:

Error 1 The name 'Uppercase' does not exist in the current context
Oct 26 '10 #3
GaryTexmo
1,501 Expert 1GB
Please review both my post and the MSDN article. I'm not sure how you got Uppercase as a viable method to call, the error message is pretty clear here.

The link is a list of methods available on the string class, you'll want the ones that convert to upper or lower case. Read the link, find the appropriate method, and click it's name. You'll find a code example there.
Oct 26 '10 #4
You have to use it in the following way
Expand|Select|Wrap|Line Numbers
  1. string strCountry = this.textBox1.Text.ToUpper();
  2.  
and for lowercase
Expand|Select|Wrap|Line Numbers
  1. string strCountry = this.textBox1.Text.ToLower();
  2.  
Oct 26 '10 #5
lenniekuah
126 100+
Hullo Robit
Thank you for sharing the sample coding with me. That is awesomea and my coding is working how.

You are wonderful and generous in sharing your knowledge with me. I have learned somehthing new from you. thank you very much
Oct 26 '10 #6
NeoPa
32,556 Expert Mod 16PB
Sorry Rohit.

I've reset the Best Answer in this case as it is simply a repeat of what had already been stated in an earlier reply.

I have no idea why Lennie chose to assign yours in place of the earlier, perfectly good, reply, but that is not what the feature is for.

This is in no way a criicism of your post - simply that post #2 was at least as good and already posted. It may not have been an abuse, but it was certainly illogical.
Oct 28 '10 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: semovrs | last post by:
Hello, everyone! I would appreciate any input or advice on the following quite simple issue: If I search through a file list using grep -E '.*$' it will not pull files ending in JPG and files...
10
by: David | last post by:
What can I do to accept either uppercase or lower case " y or n" in the program below.? any help will be appreciated #include <iostream> using namespace std; //class definigtion class Pizza...
17
by: Janice | last post by:
char* line = "abcd"; How to convert the line to upper case and print? Any option for printf to do this? Thanx
4
by: Chris | last post by:
Hi, How can I programatically set Upper, Lower and Normal case on a label or text box controls? Thanks
19
by: Eric Lindsay | last post by:
Should HTML 4.01 Strict markup be done in upper case or in lower case? I understand that HTML allows either upper or lower case. I also notice that XHTML apparently requires lower case. However I...
9
by: B Williams | last post by:
I have written some code that will take in a string and print out the reverse, but I also want it to check for upper and lower case and swap them. Will someone assist me? include <iostream>...
4
by: silversnake | last post by:
Hi , dose one know the code for checking through a string for upper or lower case char's and reverse them of find ? thanks
5
by: cfmx2008 | last post by:
Hi Guys, I hope you could help me to solve this problem. Here it is: I have a huge table of data. Some data are Lower case and some are upper case. these data could be changed by agents, But I want...
2
by: vhsb69 | last post by:
WeIrd - my I,O and P keys tyPe Out In uPPercase, everythIng else Is In lOwercase. Keys are nOt stIckIng. Any One gOt any Ideas? Please helP me I am very cOnfused.
5
by: ziycon | last post by:
I have a string and want to find any character that is lower case, any ideas how to do this, is there a function that will decipher between upper and lower case?
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.