Click here to Skip to main content
15,887,214 members
Home / Discussions / C#
   

C#

 
GeneralRe: Formula Pin
Jeff Varszegi26-Apr-04 19:43
professionalJeff Varszegi26-Apr-04 19:43 
GeneralRe: Formula Pin
DucLinh26-Apr-04 20:59
DucLinh26-Apr-04 20:59 
GeneralRe: Formula Pin
Jeff Varszegi27-Apr-04 3:09
professionalJeff Varszegi27-Apr-04 3:09 
GeneralRe: Formula Pin
Mazdak26-Apr-04 21:12
Mazdak26-Apr-04 21:12 
GeneralRe: Formula Pin
leppie27-Apr-04 7:05
leppie27-Apr-04 7:05 
GeneralParsing a string object Pin
Tony D. Abel26-Apr-04 17:55
Tony D. Abel26-Apr-04 17:55 
GeneralRe: Parsing a string object Pin
Jeff Varszegi26-Apr-04 18:05
professionalJeff Varszegi26-Apr-04 18:05 
GeneralRe: Parsing a string object Pin
Tony D. Abel27-Apr-04 7:02
Tony D. Abel27-Apr-04 7:02 
Good day Jeff...

Again thanks for your input. This is what I came up with:

Int32 loadArrays = 0;
char[] delimiters = new char[] {'-'};
string[] substringsBookChapVerID = null;
string strBookChapVerID;
ArrayList chapterList = new ArrayList();
ArrayList verseList = new ArrayList();

///
/// Get the columns primary ID string from the row
///

foreach ( DataRow bibleRow in bibleDataset.Tables[BibleColumnName].Rows )
{
strBookChapVerID = (string) bibleRow[BibleColumnName];
substringsBookChapVerID = strBookChapVerID.Split( delimiters );
///
/// Get the book, chapter and verses substrings
///

foreach ( string number in substringsBookChapVerID )
{

///
/// Save the book, chapter and verses substrings for sorting
///

switch ( loadArrays )
{
case 0:
bookNumber = number;
loadArrays++;
break;

case 1:
if ( number == "0" )
{
loadArrays++;
break;
}

if ( chapterList.Count == 0 )
{ chapterList.Add( number );
loadArrays++;
break;
}
else if ( chapterList.IndexOf( number ) <= -1 )
{
chapterList.Add( number ); loadArrays++;
break;
}

loadArrays++;
break;

case 2:
if ( number.TrimEnd( ' ' ) == "0" )
{
loadArrays = 0;
break;
}

verseList.Add( number.TrimEnd( ' ' ) );
loadArrays = 0;
break;

} // end switch loadArrays
} // end number
} // end bibleRow

I hope you may be able to use this snippet in the future for some project

Have a great coding day.

Regards,

Tony D. Abel
GeneralFormula Pin
DucLinh26-Apr-04 15:56
DucLinh26-Apr-04 15:56 
Generalcreating an array of existing WinForm controls Pin
Roman Nurik26-Apr-04 13:48
Roman Nurik26-Apr-04 13:48 
GeneralRe: creating an array of existing WinForm controls Pin
Roman Nurik26-Apr-04 13:51
Roman Nurik26-Apr-04 13:51 
GeneralRe: creating an array of existing WinForm controls Pin
Mike Dimmick26-Apr-04 23:43
Mike Dimmick26-Apr-04 23:43 
GeneralRe: creating an array of existing WinForm controls Pin
Mike Ellison26-Apr-04 17:03
Mike Ellison26-Apr-04 17:03 
GeneralRe: creating an array of existing WinForm controls Pin
Heath Stewart27-Apr-04 4:17
protectorHeath Stewart27-Apr-04 4:17 
GeneralLabel question... Pin
spoon vs fork26-Apr-04 13:47
spoon vs fork26-Apr-04 13:47 
GeneralRe: Label question... Pin
Roman Rodov26-Apr-04 14:55
Roman Rodov26-Apr-04 14:55 
GeneralRe: Label question... Pin
Jay Shankar26-Apr-04 15:43
Jay Shankar26-Apr-04 15:43 
GeneralListView and Inserting Subitems Pin
valikac26-Apr-04 12:17
valikac26-Apr-04 12:17 
GeneralRe: ListView and Inserting Subitems Pin
Jon G26-Apr-04 12:59
Jon G26-Apr-04 12:59 
GeneralRe: ListView and Inserting Subitems Pin
valikac26-Apr-04 14:40
valikac26-Apr-04 14:40 
GeneralRe: ListView and Inserting Subitems Pin
osto26-Apr-04 17:17
osto26-Apr-04 17:17 
GeneralRe: ListView and Inserting Subitems Pin
valikac26-Apr-04 18:10
valikac26-Apr-04 18:10 
GeneralUsing Bitmap and got exception in dispose Pin
kobyb26-Apr-04 11:28
kobyb26-Apr-04 11:28 
Generalconditional operator (?:) performance Pin
Anonymous26-Apr-04 10:53
Anonymous26-Apr-04 10:53 
GeneralRe: conditional operator (?:) performance Pin
Daniel Turini26-Apr-04 11:21
Daniel Turini26-Apr-04 11:21 

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.