Click here to Skip to main content
15,914,416 members
Home / Discussions / C#
   

C#

 
GeneralRe: Implementing Layouts Pin
Mohamad Al Husseiny18-Aug-05 1:52
Mohamad Al Husseiny18-Aug-05 1:52 
GeneralUpdating and Inserting From DataGrid To MS SQL Pin
sonicsqwirl18-Aug-05 0:23
sonicsqwirl18-Aug-05 0:23 
GeneralScrollbars in UserControl Pin
bouli18-Aug-05 0:02
bouli18-Aug-05 0:02 
GeneralRe: Scrollbars in UserControl Pin
Mohamad Al Husseiny18-Aug-05 1:47
Mohamad Al Husseiny18-Aug-05 1:47 
GeneralcharAt help Pin
binglin17-Aug-05 23:22
binglin17-Aug-05 23:22 
GeneralRe: charAt help Pin
lmoelleb18-Aug-05 0:20
lmoelleb18-Aug-05 0:20 
GeneralRe: charAt help Pin
binglin18-Aug-05 17:28
binglin18-Aug-05 17:28 
GeneralRe: charAt help Pin
lmoelleb18-Aug-05 20:19
lmoelleb18-Aug-05 20:19 
You need to have a look at the basic types of C#. A char is a single character and it simply isn't the same type as a string. If you look at my sample code you would se that I was declaring a char - so not a string - to receive the value.

So this should work:

string repRec;<br />
char repAddr;<br />
<br />
repRec=rec.ToString();<br />
this.repAddr=repRec[2];


Notice that rec.ToString() is a bit scary - it is not strongly typed. I would recommend a real cast of possible (or access to string members - whatever), then you get an error if it does not make sense. You might be used to loose type checks from JavaScript and find the strict checks of C# annoying... just wait until you are used to them, then you will hate the loose typechecks as they give way too many errors.
GeneralRe: charAt help Pin
mav.northwind20-Aug-05 9:27
mav.northwind20-Aug-05 9:27 
QuestionA better way to do this? Pin
John Nobody17-Aug-05 22:57
John Nobody17-Aug-05 22:57 
AnswerRe: A better way to do this? Pin
leppie17-Aug-05 23:33
leppie17-Aug-05 23:33 
GeneralRe: A better way to do this? Pin
Anonymous17-Aug-05 23:58
Anonymous17-Aug-05 23:58 
GeneralRe: A better way to do this? Pin
leppie18-Aug-05 0:07
leppie18-Aug-05 0:07 
GeneralNeed help with threading Pin
Yannielsen17-Aug-05 22:56
Yannielsen17-Aug-05 22:56 
GeneralRe: Need help with threading Pin
Sean Michael Murphy18-Aug-05 3:45
Sean Michael Murphy18-Aug-05 3:45 
QuestionHow to identify .NET dll from others (such as COM dll) Pin
Member 220452217-Aug-05 22:42
Member 220452217-Aug-05 22:42 
AnswerRe: How to identify .NET dll from others (such as COM dll) Pin
Anonymous17-Aug-05 23:06
Anonymous17-Aug-05 23:06 
GeneralRe: How to identify .NET dll from others (such as COM dll) Pin
Member 220452217-Aug-05 23:24
Member 220452217-Aug-05 23:24 
GeneralRe: How to identify .NET dll from others (such as COM dll) Pin
Daniel Grunwald18-Aug-05 3:27
Daniel Grunwald18-Aug-05 3:27 
GeneralRe: How to identify .NET dll from others (such as COM dll) Pin
Vasudevan Deepak Kumar18-Aug-05 3:08
Vasudevan Deepak Kumar18-Aug-05 3:08 
AnswerRe: How to identify .NET dll from others (such as COM dll) Pin
Sean Michael Murphy18-Aug-05 3:37
Sean Michael Murphy18-Aug-05 3:37 
GeneralIdentify managed or unmanaged dll. Pin
shivonkar17-Aug-05 21:37
shivonkar17-Aug-05 21:37 
GeneralRe: Identify managed or unmanaged dll. Pin
Matt Gerrans17-Aug-05 21:58
Matt Gerrans17-Aug-05 21:58 
GeneralRe: Identify managed or unmanaged dll. Pin
leppie17-Aug-05 23:13
leppie17-Aug-05 23:13 
GeneralPDA MAC address or similar id Pin
spif200117-Aug-05 21:31
spif200117-Aug-05 21:31 

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.