Click here to Skip to main content
15,900,377 members
Home / Discussions / C#
   

C#

 
AnswerRe: error is coming while application is running and ask to continue the application Pin
Dave Kreskowiak12-Feb-15 5:10
mveDave Kreskowiak12-Feb-15 5:10 
AnswerRe: error is coming while application is running and ask to continue the application Pin
OriginalGriff12-Feb-15 5:26
mveOriginalGriff12-Feb-15 5:26 
AnswerRe: error is coming while application is running and ask to continue the application Pin
jschell12-Feb-15 11:15
jschell12-Feb-15 11:15 
Questionaltering a merge sort to compare strings from input box Pin
Member 1083623511-Feb-15 21:10
Member 1083623511-Feb-15 21:10 
AnswerRe: altering a merge sort to compare strings from input box Pin
Richard MacCutchan11-Feb-15 21:41
mveRichard MacCutchan11-Feb-15 21:41 
GeneralRe: altering a merge sort to compare strings from input box Pin
harold aptroot11-Feb-15 21:42
harold aptroot11-Feb-15 21:42 
AnswerRe: altering a merge sort to compare strings from input box Pin
Pete O'Hanlon11-Feb-15 21:47
mvePete O'Hanlon11-Feb-15 21:47 
AnswerRe: altering a merge sort to compare strings from input box Pin
OriginalGriff11-Feb-15 22:01
mveOriginalGriff11-Feb-15 22:01 
Please, don't post code like that:
public void Merge(string[] nameArray, int lower, int middle, int upper)
{
string[] temp = new string[nameArray.Length];
int lowEnd = middle - 1;
int low = lower;
int n = upper - lower + 1;
while ((lower <= lowEnd) && (middle <= upper))
{
if ((nameArray[lower]).CompareTo(nameArray[middle])<= 0)
{
temp[low] = nameArray[lower];
low++;
lower++;
}
else
{
temp[low] = nameArray[middle];
low++;
middle++;
}
}
while (lower &lt;= lowEnd)
{
temp[low] = nameArray[lower];
low++;
lower++;
}
while (middle &lt;= upper)
{
temp[low] = nameArray[middle];
low++;
middle++;
}
for (int i = 0; i &lt; n; i++)
{
nameArray[upper] = temp[upper];
upper--;
}
}



It makes it very hard to read!
Instead, use the "code" button above the text box to insert the <pre> tags which preserve formatting:
C#
public void Merge(string[] nameArray, int lower, int middle, int upper)
    {
    string[] temp = new string[nameArray.Length];
    int lowEnd = middle - 1;
    int low = lower;
    int n = upper - lower + 1;
    while ((lower <= lowEnd) && (middle <= upper))
        {
        if ((nameArray[lower]).CompareTo(nameArray[middle])<= 0)
            {
            temp[low] = nameArray[lower];
            low++;
            lower++;
            }
        else
            {
            temp[low] = nameArray[middle];
            low++;
            middle++;
            }
        }
    while (lower <= lowEnd)
        {
        temp[low] = nameArray[lower];
        low++;
        lower++;
        }
    while (middle <= upper)
        {
        temp[low] = nameArray[middle];
        low++;
        middle++;
        }
    for (int i = 0; i < n; i++)
        {
        nameArray[upper] = temp[upper];
        upper--;
        }
    }

Second, a problem report like "Im stuck on the sort...my code atm.... Help its driving me loopy" tells us nothing at all about the problem you are having.

Tell us what it does that you didn't expect, or doesn't do that you did!
Tell us what data you use to test it, and what you expect to get as a result. Then show us what you do get!

The better the information you give us (and remember that we can't see your screen, access your HDD, or read your mind) the better we can help you to fix the problem.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

GeneralRe: altering a merge sort to compare strings from input box Pin
Member 1083623511-Feb-15 23:23
Member 1083623511-Feb-15 23:23 
GeneralRe: altering a merge sort to compare strings from input box Pin
OriginalGriff11-Feb-15 23:49
mveOriginalGriff11-Feb-15 23:49 
QuestionDeclare the type of cell of DevExpress GridView ? Pin
Member 245846711-Feb-15 20:15
Member 245846711-Feb-15 20:15 
AnswerRe: Declare the type of cell of DevExpress GridView ? Pin
Dave Kreskowiak12-Feb-15 2:44
mveDave Kreskowiak12-Feb-15 2:44 
GeneralRe: Declare the type of cell of DevExpress GridView ? Pin
Member 245846715-Feb-15 19:49
Member 245846715-Feb-15 19:49 
GeneralRe: Declare the type of cell of DevExpress GridView ? Pin
Dave Kreskowiak16-Feb-15 2:41
mveDave Kreskowiak16-Feb-15 2:41 
GeneralRe: Declare the type of cell of DevExpress GridView ? Pin
Member 245846716-Feb-15 16:53
Member 245846716-Feb-15 16:53 
GeneralRe: Declare the type of cell of DevExpress GridView ? Pin
Dave Kreskowiak16-Feb-15 17:56
mveDave Kreskowiak16-Feb-15 17:56 
QuestionAny examples on using libsodium-net , saving keypairs, encrypt/decrypt files? Pin
vizimuchi11-Feb-15 8:32
vizimuchi11-Feb-15 8:32 
AnswerRe: Any examples on using libsodium-net , saving keypairs, encrypt/decrypt files? Pin
Afzaal Ahmad Zeeshan11-Feb-15 9:23
professionalAfzaal Ahmad Zeeshan11-Feb-15 9:23 
GeneralRe: Any examples on using libsodium-net , saving keypairs, encrypt/decrypt files? Pin
vizimuchi11-Feb-15 16:01
vizimuchi11-Feb-15 16:01 
QuestionHow can I open a webpage in IE and fill in 1 or more text boxes in the page? Pin
turbosupramk311-Feb-15 2:14
turbosupramk311-Feb-15 2:14 
AnswerRe: How can I open a webpage in IE and fill in 1 or more text boxes in the page? Pin
turbosupramk311-Feb-15 6:31
turbosupramk311-Feb-15 6:31 
GeneralRe: How can I open a webpage in IE and fill in 1 or more text boxes in the page? Pin
Eddy Vluggen11-Feb-15 7:33
professionalEddy Vluggen11-Feb-15 7:33 
GeneralRe: How can I open a webpage in IE and fill in 1 or more text boxes in the page? Pin
turbosupramk311-Feb-15 7:42
turbosupramk311-Feb-15 7:42 
GeneralRe: How can I open a webpage in IE and fill in 1 or more text boxes in the page? Pin
Eddy Vluggen11-Feb-15 7:59
professionalEddy Vluggen11-Feb-15 7:59 
GeneralRe: How can I open a webpage in IE and fill in 1 or more text boxes in the page? Pin
turbosupramk311-Feb-15 8:25
turbosupramk311-Feb-15 8:25 

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.