Click here to Skip to main content
15,886,723 members
Home / Discussions / C#
   

C#

 
GeneralRe: Question about using an if in a string Pin
OriginalGriff2-Sep-13 21:24
mveOriginalGriff2-Sep-13 21:24 
GeneralRe: Question about using an if in a string Pin
Dave Kreskowiak2-Sep-13 5:58
mveDave Kreskowiak2-Sep-13 5:58 
GeneralRe: Question about using an if in a string Pin
blitzkrieged2-Sep-13 14:16
blitzkrieged2-Sep-13 14:16 
AnswerRe: Question about using an if in a string Pin
liveoffedge2-Sep-13 0:15
professionalliveoffedge2-Sep-13 0:15 
GeneralRe: Question about using an if in a string Pin
OriginalGriff2-Sep-13 3:49
mveOriginalGriff2-Sep-13 3:49 
GeneralRe: Question about using an if in a string Pin
Keith Barrow2-Sep-13 6:21
professionalKeith Barrow2-Sep-13 6:21 
GeneralRe: Question about using an if in a string Pin
skeeterz713-Sep-13 6:30
skeeterz713-Sep-13 6:30 
AnswerRe: Question about using an if in a string Pin
AmitGajjar2-Sep-13 20:02
professionalAmitGajjar2-Sep-13 20:02 
As other suggested, You have problem with the if condition. First you need to learn about the difference between variable and it's value. In the given if condition you have herName as variable of type string. Now you need to compare string with string only. That could be possible either by comparing string variable like,

C#
string storedName = "ashley";
if(herName == storedName)


Or by directly comparing string with the variable like,

C#
if(herName == "ashley")


Before go for the solution oriented learning just read one of the beginner book or online materials(MSDN) to understand concepts.
Thanks
-Amit Gajjar

QuestionDistinct Row or Rows in a datatable Pin
smh139231-Aug-13 22:00
smh139231-Aug-13 22:00 
AnswerRe: Distinct Row or Rows in a datatable Pin
Mycroft Holmes31-Aug-13 22:42
professionalMycroft Holmes31-Aug-13 22:42 
GeneralRe: Distinct Row or Rows in a datatable Pin
smh13922-Sep-13 10:48
smh13922-Sep-13 10:48 
AnswerRe: Distinct Row or Rows in a datatable Pin
susanna.floora1-Sep-13 19:09
susanna.floora1-Sep-13 19:09 
GeneralRe: Distinct Row or Rows in a datatable Pin
Mycroft Holmes1-Sep-13 19:52
professionalMycroft Holmes1-Sep-13 19:52 
QuestionPut DLL file to another location Pin
Midnight Ahri31-Aug-13 14:43
Midnight Ahri31-Aug-13 14:43 
AnswerRe: Put DLL file to another location Pin
Dave Kreskowiak31-Aug-13 15:10
mveDave Kreskowiak31-Aug-13 15:10 
AnswerRe: Put DLL file to another location Pin
Abhinav S31-Aug-13 15:51
Abhinav S31-Aug-13 15:51 
QuestionHow to get user names accessing ACCESS database Pin
BajrangSingh31-Aug-13 8:22
BajrangSingh31-Aug-13 8:22 
AnswerRe: How to get user names accessing ACCESS database Pin
Dave Kreskowiak31-Aug-13 8:29
mveDave Kreskowiak31-Aug-13 8:29 
GeneralRe: How to get user names accessing ACCESS database Pin
BajrangSingh31-Aug-13 9:32
BajrangSingh31-Aug-13 9:32 
GeneralRe: How to get user names accessing ACCESS database Pin
Dave Kreskowiak31-Aug-13 10:30
mveDave Kreskowiak31-Aug-13 10:30 
GeneralRe: How to get user names accessing ACCESS database Pin
BajrangSingh31-Aug-13 18:40
BajrangSingh31-Aug-13 18:40 
GeneralRe: How to get user names accessing ACCESS database Pin
Dave Kreskowiak1-Sep-13 5:02
mveDave Kreskowiak1-Sep-13 5:02 
AnswerRe: How to get user names accessing ACCESS database Pin
Mycroft Holmes31-Aug-13 13:09
professionalMycroft Holmes31-Aug-13 13:09 
GeneralRe: How to get user names accessing ACCESS database Pin
jschell31-Aug-13 13:57
jschell31-Aug-13 13:57 
GeneralRe: How to get user names accessing ACCESS database Pin
Mycroft Holmes31-Aug-13 16:17
professionalMycroft Holmes31-Aug-13 16:17 

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.