index > Visual C# General > upper case

upper case

What is wrong with this statment. I am trying to do upper case

letter = string.ToUpper(letter);

cisco0407

I am guessing that letter is defined as a char in which case you need to use char.ToUpper(letter).

In the future when something isn't working and you're seeking help it's always helpful to provide the exact error message you are gettingg and when you are getting it, e.g. at runtime or compile time. It helps you get help faster. Thanks.

Hope this helps.

MarcD
NO LETTER IS TYPE STRING
cisco0407

The String class does not have a static method named ToUpper() that you can call in that way, instead you should call the ToUpper() method on the string instance you wish to carry it out on ala:

letter = letter.ToUpper();




Please visit http://www.brendansstudentloans.com to help me pay off my student loans a little faster
Brendan Grant
reply 4

You can use google to search for other answers

 

More Articles

• HELP PLEASE - The type or namespace name'Office' does not exist i...
• The event handler Keypress doesn't start when user press keys F1-...
• How to: Insert into 2 tables in the database
• .NET Remoting
• C# CommandBarButton question
• Code execution just occurs on debugging time...HELP!
• Formating File output
• Thread Safety and Collection Problem
• execute something by another thread CHALLENGE!!!!!
• question about delegate and event
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• How to write code for Logout Page in ASP
• Loading form in main form
• How do I listen for File Downloads using
• How to hide code of .NET dll [aspnet + c#]
• RawState()
• SMS with c#?
• Confused about some OOP concepts... good
• Async Sockets
• Adding an MDI form to a Tab Page
• Binary Write array...
• Limiting Bandwidth Per Application or Pe
• IEnumerable<T> compile error
• how i can work with struct and union(str
• pros and cons of using Microsoft Enterpr
• adding settingsprovider to settings Init

Hot Articles

• Test conversion of System types
• MultiSelect in MonthCalendar
• System.Management (WMI) Question
• system traycwith c#
• ProgressChanged not being called?
• Changing language(keyboard language)
• To create codeDOM tree
• e-mail link
• Disabling Text boxes
• command prompt return immediately when r
• Response.Redirect
• ASPNET user
• Display 2 different tables in 1 datagrid
• Database error reading Access database
• The best way

Recommend Articles

• Panel.visible
• Problem with variable
• ListBox
• Noob: Nested For loops Example
• Shell Context menu (aka Win Explorer con
• Item Template Problem
• How to merge in new data from second dat
• How do I find the printable client width
• create DLL with unresolved externals
• foreach Page.Constrols
• Voice Chat in C#
• strange performace question, maybe a bug?
• How do I "completely minimize"
• cookies
• Typical problem