Click here to Skip to main content
15,894,362 members
Home / Discussions / C#
   

C#

 
AnswerRe: Publish : Setup is not working on client machine Pin
Abhijit Jana23-Apr-09 20:04
professionalAbhijit Jana23-Apr-09 20:04 
GeneralRe: Publish : Setup is not working on client machine Pin
ddravin200023-Apr-09 20:54
ddravin200023-Apr-09 20:54 
Questionretrive image local path from web handler Pin
LiYS23-Apr-09 17:20
LiYS23-Apr-09 17:20 
AnswerRe: retrive image local path from web handler Pin
Christian Graus23-Apr-09 20:22
protectorChristian Graus23-Apr-09 20:22 
QuestionHow To Capture The Whole ClientZone Of Window With The Scroll Pin
wangxuekong23-Apr-09 16:19
wangxuekong23-Apr-09 16:19 
QuestionHttpWebRequest and HttpWebResponse Pin
AndieDu23-Apr-09 15:25
AndieDu23-Apr-09 15:25 
QuestionAny news when LINQ be able to talk to Oracle/MySQL Pin
devvvy23-Apr-09 15:05
devvvy23-Apr-09 15:05 
QuestionOperator | | Pin
ctreed72823-Apr-09 13:38
ctreed72823-Apr-09 13:38 
Hi everyone. I'm new here and new to using C# coding as well so any help would be greatly apprectiated! I am trying to build my program but this message keeps popping up: Operator '||' cannot be applied to operands of type 'bool' and 'string'

I have tried everything that I know. Please help! The code is below:



using System;

namespace Program13
{
class StateAbbreviations
{
public static void Main( )
{
string stateabb;


Console.WriteLine("Enter all of the following state abbreviations: NC, AL, GA, FL, OH");
stateabb = Console.ReadLine();

Console.WriteLine("\n");


if (stateabb == "NC" || "nc")
Console.WriteLine("North Carolina");
else if (stateabb == "AL" || "al")
Console.WriteLine("Alabama");
else if (stateabb == "GA" || "ga")
Console.WriteLine("Georgia");
else if (stateabb == "FL" || "fl")
Console.WriteLine("Florida");
else if (stateabb == "OH" || "oh")
Console.WriteLine("Ohio");

else Console.WriteLine("Not one of the selected states");


}
}
}

AnswerRe: Operator | | Pin
Luc Pattyn23-Apr-09 14:59
sitebuilderLuc Pattyn23-Apr-09 14:59 
GeneralRe: Operator | | Pin
ctreed72823-Apr-09 15:17
ctreed72823-Apr-09 15:17 
GeneralRe: Operator | | Pin
Luc Pattyn23-Apr-09 15:21
sitebuilderLuc Pattyn23-Apr-09 15:21 
GeneralRe: Operator | | Pin
ctreed72823-Apr-09 16:14
ctreed72823-Apr-09 16:14 
QuestionRe: Operator | | Pin
CPallini23-Apr-09 21:45
mveCPallini23-Apr-09 21:45 
AnswerRe: Operator | | Pin
PIEBALDconsult24-Apr-09 4:01
mvePIEBALDconsult24-Apr-09 4:01 
Questionsending SMS from PC through USB port Pin
invisible_eagle23-Apr-09 12:43
invisible_eagle23-Apr-09 12:43 
AnswerRe: sending SMS from PC through USB port Pin
akyriako7824-Apr-09 1:45
akyriako7824-Apr-09 1:45 
QuestionReading from excel.. Pin
Jacob Dixon23-Apr-09 10:44
Jacob Dixon23-Apr-09 10:44 
AnswerRe: Reading from excel.. [modified] Pin
fly90423-Apr-09 11:27
fly90423-Apr-09 11:27 
GeneralRe: Reading from excel.. Pin
Jacob Dixon24-Apr-09 13:38
Jacob Dixon24-Apr-09 13:38 
GeneralRe: Reading from excel.. Pin
fly90424-Apr-09 14:08
fly90424-Apr-09 14:08 
GeneralRe: Reading from excel.. Pin
fly90424-Apr-09 14:48
fly90424-Apr-09 14:48 
GeneralRe: Reading from excel.. Pin
Jacob Dixon24-Apr-09 14:50
Jacob Dixon24-Apr-09 14:50 
AnswerRe: Reading from excel.. Pin
Ashfield23-Apr-09 20:56
Ashfield23-Apr-09 20:56 
GeneralRe: Reading from excel.. Pin
Jacob Dixon24-Apr-09 13:38
Jacob Dixon24-Apr-09 13:38 
GeneralRe: Reading from excel.. Pin
Ashfield25-Apr-09 7:34
Ashfield25-Apr-09 7:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.