Click here to Skip to main content
15,890,043 members
Home / Discussions / C#
   

C#

 
Questionhelp for enabled property Pin
vamsimohan2115-Nov-06 1:17
vamsimohan2115-Nov-06 1:17 
AnswerRe: help for enabled property Pin
stancrm15-Nov-06 2:25
stancrm15-Nov-06 2:25 
GeneralRe: help for enabled property Pin
vamsimohan2115-Nov-06 16:29
vamsimohan2115-Nov-06 16:29 
GeneralRe: help for enabled property Pin
vinSharp15-Nov-06 20:32
vinSharp15-Nov-06 20:32 
Questionneed to convert INSTR() INTO C# Pin
M Riaz Bashir15-Nov-06 0:58
M Riaz Bashir15-Nov-06 0:58 
AnswerRe: need to convert INSTR() INTO C# Pin
J4amieC15-Nov-06 1:11
J4amieC15-Nov-06 1:11 
GeneralRe: need to convert INSTR() INTO C# Pin
M Riaz Bashir15-Nov-06 1:27
M Riaz Bashir15-Nov-06 1:27 
AnswerRe: need to convert INSTR() INTO C# Pin
Guffa15-Nov-06 4:12
Guffa15-Nov-06 4:12 
Let's first convert it to VB.NET:

strActual = "BAT BALL GOALKEEPER"<br />
intPosition = strActual.IndexOf("BALL")


Now it's very simple to convert it to C#:

strActual = "BAT BALL GOALKEEPER";<br />
intPosition = strActual.IndexOf("BALL");


Note: There is a difference how strings are handled in .NET compared to VB6. The index is zero based, not one based, and IndexOf it returns -1 if the string is not found, not 0.


---
b { font-weight: normal; }

QuestionA good ADO.NET Book? Pin
Blekk15-Nov-06 0:51
Blekk15-Nov-06 0:51 
AnswerRe: A good ADO.NET Book? Pin
Syed Shahid Hussain15-Nov-06 6:22
Syed Shahid Hussain15-Nov-06 6:22 
AnswerRe: A good ADO.NET Book? Pin
tgrt15-Nov-06 16:25
tgrt15-Nov-06 16:25 
GeneralRe: A good ADO.NET Book? Pin
Blekk16-Nov-06 0:45
Blekk16-Nov-06 0:45 
QuestionData Storage Pin
GermanDM15-Nov-06 0:33
GermanDM15-Nov-06 0:33 
AnswerRe: Data Storage Pin
Tamimi - Code15-Nov-06 0:48
Tamimi - Code15-Nov-06 0:48 
GeneralRe: Data Storage Pin
GermanDM15-Nov-06 0:58
GermanDM15-Nov-06 0:58 
GeneralRe: Data Storage Pin
Guffa15-Nov-06 1:04
Guffa15-Nov-06 1:04 
GeneralRe: Data Storage Pin
Tamimi - Code15-Nov-06 1:07
Tamimi - Code15-Nov-06 1:07 
GeneralRe: Data Storage Pin
Guffa15-Nov-06 2:17
Guffa15-Nov-06 2:17 
GeneralRe: Data Storage Pin
Tamimi - Code15-Nov-06 2:29
Tamimi - Code15-Nov-06 2:29 
GeneralRe: Data Storage Pin
tgrt15-Nov-06 16:30
tgrt15-Nov-06 16:30 
AnswerRe: Data Storage Pin
Guffa15-Nov-06 0:57
Guffa15-Nov-06 0:57 
Questionconcurency violation delete command affected 0 records in acess database? Pin
subburaj.sabapathy15-Nov-06 0:28
subburaj.sabapathy15-Nov-06 0:28 
Questionaccessing the value of a textbox in another form Pin
shanisnathan15-Nov-06 0:24
shanisnathan15-Nov-06 0:24 
AnswerRe: accessing the value of a textbox in another form Pin
rah_sin15-Nov-06 0:34
professionalrah_sin15-Nov-06 0:34 
QuestionWhen to use Application Data Pin
nflrodrigues15-Nov-06 0:18
nflrodrigues15-Nov-06 0:18 

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.