473,748 Members | 7,142 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C#NET2008 Upper case and Lower case Character

126 New Member
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.txtN ame.text) <-- not working

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

Thank you for your help.

Cheers,
Lennie
Oct 26 '10 #1
6 3120
GaryTexmo
1,501 Recognized Expert Top Contributor
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 New Member
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.tex t)

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 Recognized Expert Top Contributor
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
Rohit Garg
8 New Member
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 New Member
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,571 Recognized Expert Moderator MVP
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
8690
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 ending in png which is fine. However, I have some files ending in jpg (note - lower case) and it will not display them either. Why is that? Am I doing something wrong here and if so - what? It obviously is a regexp issue and not a grep issue because...
10
2937
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
11226
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
1787
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
26448
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 saw some mention that the HTML DOM uses upper case for markup elements. So, should I worry about what this means? I am inclined to go with lower case, for two reasons. Easier to change if I subsequently want to use XHTML.
9
2794
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> using std::cout; using std::cin; using std::endl; #include <string>
4
5150
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
3084
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 to keep the case. For example: if data is Lower case and it changed to upper case at the time of change it should be lower case again. I know sounds terrible, but this is the problem. any hints will be appreciated. thanks
2
2909
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
2851
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
8830
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9370
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9321
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8242
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4602
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2782
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.