Click here to Skip to main content
15,885,309 members
Home / Discussions / C#
   

C#

 
GeneralRe: SqlDataReader is not returning all rows Pin
Pete O'Hanlon2-Sep-13 20:22
mvePete O'Hanlon2-Sep-13 20:22 
QuestionQuestion about using an if in a string Pin
skeeterz711-Sep-13 17:35
skeeterz711-Sep-13 17:35 
AnswerRe: Question about using an if in a string Pin
Dave Kreskowiak1-Sep-13 18:05
mveDave Kreskowiak1-Sep-13 18:05 
GeneralRe: Question about using an if in a string Pin
skeeterz711-Sep-13 18:31
skeeterz711-Sep-13 18:31 
GeneralRe: Question about using an if in a string Pin
Dave Kreskowiak1-Sep-13 18:37
mveDave Kreskowiak1-Sep-13 18:37 
GeneralRe: Question about using an if in a string Pin
skeeterz711-Sep-13 18:46
skeeterz711-Sep-13 18:46 
GeneralRe: Question about using an if in a string Pin
BillWoodruff1-Sep-13 19:42
professionalBillWoodruff1-Sep-13 19:42 
GeneralRe: Question about using an if in a string Pin
OriginalGriff2-Sep-13 3:58
mveOriginalGriff2-Sep-13 3:58 
No, no, it just doesn't work like that!

Forget computers for a moment, and suppose you are on the phone, talking to a company. The lady at the other end asks you a question "What is your name?"
You reply "Skeeterz".

Does that move you physically into her company, or automatically create a file in her computer?
Of course not! That would be silly...

What it does do is transfer a small amount of information from one place (your home) to another (her office) - and she will make a note of it by jotting it on a piece of paper, perhaps, or typing it into her computer to see if there is any information on you allready.

The computer program you wrote does the same thing: It asks "What is your name?" and the user replies "ashley" - that transfers the information from the user space into the program space, and stores it in memory, putting a "reminder" for what her name is into the variable "herName". In future, whenever you want to use the users name, you just use the variable "herName":
C#
Console.WriteLine("Hello " + herName + " and welcome!");
Or
C#
UserDetails herInfo = LookupInTheDatabase(herName);

This message is manufactured from fully recyclable noughts and ones. To recycle this message, please separate into two tidy piles, and take them to your nearest local recycling centre.
Please note that in some areas noughts are always replaced with zeros by law, and many facilities cannot recycle zeroes - in this case, please bury them in your back garden and water frequently.

GeneralRe: Question about using an if in a string Pin
AmitGajjar2-Sep-13 20:10
professionalAmitGajjar2-Sep-13 20:10 
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 
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 

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.