Mike Askew 131 Veteran Poster Featured Poster

You yourself can mark it solved with the button at the bottom of the thread :)

Mike Askew 131 Veteran Poster Featured Poster

Ace of Spades - Motörhead

Mike Askew 131 Veteran Poster Featured Poster

Keeping with the programming theme, the word null. There is no one solution to such issues, BitBit is correct in what he says.

Mike Askew 131 Veteran Poster Featured Poster

Have you checked to see the code enters the if statements correctly down the save method call?

Mike Askew 131 Veteran Poster Featured Poster

Issues I've found without running the code (not giving the direct fixes immediately as this is homework)
- Line 158, Console.ReadKey() does not directly return/convert into a string.
- Lines 162 166 and 170, the variable again is declared in the Race class and thus is not accessible to the RaceTest class without the variable being public / exposed through a public property.
- Line 138, you do not close the method, nor the entire Race class
- Line 49, you do not close the method.

Now run the code.
It seems to run fine, however I had to put the line Thread.Sleep(1000); on line 27 to be able to see anything actually happen. You may wish to consider presenting the race horizontally instead of vertically

Mike Askew 131 Veteran Poster Featured Poster

Don't You Worry Child - Swedish House Mafia

Mike Askew 131 Veteran Poster Featured Poster

In addition to Ange1's comments the following may be of interest, the web tutorials show everything.

Mike Askew 131 Veteran Poster Featured Poster

@Agile, fair do's then, I wouldn't expect to see a female orientated game to go too far on the professtional scene etc though. Best I could think of is possibly the sims :) Thats neutral/female orientated.

Mike Askew 131 Veteran Poster Featured Poster

I found an example on google within the top three entries, do you wish to try searching again.

Mike Askew 131 Veteran Poster Featured Poster

Not sure whether this is anything major or not but noticed it while trawling the source code of the site debating making a small app to monitor when post's replies are changed.

There is an error occuring of: FB.getLoginStatus() called before calling FB.init() in all.js line 52.

Mike Askew 131 Veteran Poster Featured Poster

If the two arrays are directly in sync, ie. position 0 in array one corresponds to position 0 in array two, you can for-loop through the first array and when you find a match, use the current value of the for-loop to access the related second array value.

Alternatively you could implement a 2D array to store both name and value in one array.

Mike Askew 131 Veteran Poster Featured Poster

This will be of help with clearing a WebBrowser's cache.

Mike Askew 131 Veteran Poster Featured Poster

What are we working with here? XSLT? XPATH? Other?

As retrieving the value may differ slightly as a result

Mike Askew 131 Veteran Poster Featured Poster

Xbox/playstation are unlikely to grow beyond the more avid gamers so their games will be more geared toward the adolescent-boy/young adult men

Girls game seriously also.

Mike Askew 131 Veteran Poster Featured Poster

Didn't even know there was a DaniWeb IRC :o

Mike Askew 131 Veteran Poster Featured Poster

So Jim, your at the point where you've turned into an ant :D

Mike Askew 131 Veteran Poster Featured Poster

Not my kind of thing.

I do occassionally watch Miami Ink which is another tattoo reality show.

Mike Askew 131 Veteran Poster Featured Poster

Haha nah its ok, google provides me with photos if I need them :) I prefer Panda's anyway. They are much better.

Mike Askew 131 Veteran Poster Featured Poster

Free time, what's that?

Well @happy it is this period of time during which you have nothing else to do, which for example you could use to walk into the gym you walk past everyday on the way home (god I hope I have the right admin in memory from that thread :D).

I play legaue of legends in my free time and watch internet streams of professional gamers. I also go to the gym.

Mike Askew 131 Veteran Poster Featured Poster

Thankyou, it is a picture of a character from the films Madagascar 1, 2 and 3.

Mike Askew 131 Veteran Poster Featured Poster

Welcome.

Do you know King Julian? He is also from Madagascar or so the film says :o

71139_26416503057_4870330_n

Sahil89 commented: :D +0
Mike Askew 131 Veteran Poster Featured Poster

Tries to think of a random topic to start a thread on

Nope I can't think of one. Do tell what said feature is.

Mike Askew 131 Veteran Poster Featured Poster

It might also be worth looking into more handheld devices than full on consoles? Like the Nintendo 3DS, I definately had a long string of GameBoys in my youth.

The Wii is a good shout, I have clearly become professional at Wii tennis over the years of owning one (shame I can't play it properly).

However Stul and Big also make valid arguments, is there really a need for a game console at the age of 6? Society may be advancing as a whole but its almost the same as my 8 year old nephew having a mobile phone. He really doesn't need one and I don't see the point in it.

This article will be of interest to you and probably helps solve the entire discussion of this thread.

Mike Askew 131 Veteran Poster Featured Poster

What about the words you don't know you don't know how to spell?

For everything else theres MasterCard. Couldn't help myself, lets hope the quote doesnt go over everyone's head.

For those who are really that inclined for a spell checker the wonders of google will find you an online one that even opens in a tab on your browser. So its not even in a different program! Ie. http://lmgtfy.com/?q=Online+spell+checker

The wonders of technology eh!

Mike Askew 131 Veteran Poster Featured Poster

On what line does this error occur?

Mike Askew 131 Veteran Poster Featured Poster

I spend all my time on 'League of Legends' nowadays.

Mike Askew 131 Veteran Poster Featured Poster

I believe @Pritaeas means the following:

public class PersonDetailsComparer : IComparer<PersonDetails>
    {
        public int Compare(PersonDetails x, PersonDetails y)
        {
            if (x.FirstName == "Lever")
                return 1;
            if (y.FirstName == "Lever")
                return -1;

            int returnValue = 0;
            if (x != null && y != null && x. FirstName != null && y. FirstName != null)
            {
                    return x.FirstName.CompareTo(y.FirstName );
            }
            return returnValue;
        }
    }
Mike Askew 131 Veteran Poster Featured Poster

"American Sniper" Autobiography of, Chris Kyle, the most lethal sniper in U.S history :)

Mike Askew 131 Veteran Poster Featured Poster

Haha the bing link was only because I saw it on one of our own threads and hadnt seen a 'let me bing that for you' before xD

Can a mod add those links to the useful resources heading :)

Mike Askew 131 Veteran Poster Featured Poster

There has been a noticeable increase in people asking where to start C# recently. So I have been across a couple of forums and pulled together a list of some useful links and resources.

Web Tutorials

Home and Learn Tutorial

CodeProject Tutorial P1
CodeProject Tutorial P2
CodeProject Tutorial P3
CodeProject Tutorial P4
CodeProject Tutorial P5

DreamInCode - Debugging

Helpful Tips

DreamInCode - How to efficiently search the Internet
DreamInCode - Debugging Tips
Little Wonders and Little Pitfalls

Useful Resources

These may be slightly more advanced than 'beginner'
C# Book Downloads
Blog - Mastering VS2010 debugging
Blog - VS2010 Debugging Improvements

MSDN resources:

C# Language Specification
Visual C# Resources
C# Reference
C# Programming Guide

LMGTFY's

Google
Bing

Feel free to contribute more / criticise current links and I will add/remove them.

ddanbe commented: Keep up the good work! +14
kvprajapati commented: Good resources indeed! +14
tux4life commented: Cookies for opening a thread to gather resources ;) +13
urvisha commented: thanks its too useful for me +0
Mike Askew 131 Veteran Poster Featured Poster

Its caused by passing an object to the datasource and not an actual value within the object.

Ie.

TextBox txtExample = new TextBox();
Console.WriteLine(txtExample.ToString()); //Outputs the literal textbox class to a string
Console.WriteLine(txtExample.Text); //Outputs the text field value

You need to ensure your not passing a class into the DG.

Mike Askew 131 Veteran Poster Featured Poster

Thats fair enough Dani, thankyou for replying and confirming.

Mike Askew 131 Veteran Poster Featured Poster

Was waiting to see if Dani etc responded but seems not :(

Mike Askew 131 Veteran Poster Featured Poster
ChrisHunter commented: Couldn't be more spot on if you tried +0
Mike Askew 131 Veteran Poster Featured Poster

Ok.

One question before this goes any further.

Is this some sort of college assignment/homework? As it sounds like one (not an issue if it is just helps to know)

Mike Askew 131 Veteran Poster Featured Poster

Ignore this completely. I was doing an impersonation of my avatar and not reading documentation properly.

Mike Askew 131 Veteran Poster Featured Poster

Afternoon all,

I currently am loading an XSD file from a physical file into memory to validate an XML file. However on loading the file it is containing such escape characters as \r\n to keep the formatting the document was originally in.

This then causes an exception when loading the XSD into memory.

What would be the best way to remove these escape characters?

A simple string.Replace()? or is there a more efficient method.

In total these characters are used:
- \r
- \n
- \t

Mike Askew 131 Veteran Poster Featured Poster

If you are not limited to the use of arrays this can also be done using a List<int> NumberList = new List<int>();

This will allow you to use NumberList.Add(); to add the numbers from your text box. The list also allows for-each looping through its contents which I would prefer to use over for loops (personal preference) when calculating the outputs.

Mike Askew 131 Veteran Poster Featured Poster

So this question is pretty much identical to this one..

Mike Askew 131 Veteran Poster Featured Poster

Whats the XML generated using?

Mike Askew 131 Veteran Poster Featured Poster

Cheers for the advice Dan

Mike Askew 131 Veteran Poster Featured Poster

Method example:

public int MyMethod(int NumberToAddTo, out bool Success)
{
    NumberToAddTo++;
    Success = true;
    return NumberToAddTo;
}

Call Example:

public void FormMethod()
{
    bool MethodSuccessful;
    int Number = 10;

    Number = MyMethod(Number, out MethodSuccessful);
}
Mike Askew 131 Veteran Poster Featured Poster

Can you provide the expected output code for the above example XML

Mike Askew 131 Veteran Poster Featured Poster

Thats a common problem duffman, I got caught out by it until someone told me you needed to include it also.

Mike Askew 131 Veteran Poster Featured Poster

Im amazed nobody has suggested using an out parameter here.

public string[] LandsKodComboBox(string[] dendei1, string[] dendei2, out string[] returnDendei)
        {
            string[] dendei1 = new string[5];
            string[] dendei2 = new string[7];
            //assign the array
            dendei1[2]="hello";
            //etc etc....
            returnDendei = dendei2;
            return dendei1;
        }
Mike Askew 131 Veteran Poster Featured Poster

Not sure if it just me but when using google chrome on iPad I cannot seem to up or down vote posts, the arrows seem to just be a graphic and non functional.

Any ideas why this would be?

Mike Askew 131 Veteran Poster Featured Poster

Use a streamwriter and foreach through the data set? That's how I'd do it

Mike Askew 131 Veteran Poster Featured Poster

Because the XML is loaded on the main form we will need to do the refreshing there. You will need to refresh and then reload all the data into the right places however as just reloading the file wont do that.

If it isnt working ensure youve set the dialog result values of the apply changes button to OK if using my code.

sundog1 commented: great help! +2
Mike Askew 131 Veteran Poster Featured Poster

I dont believe so because the XML is being handles on the main form?

Mike Askew 131 Veteran Poster Featured Poster

No worries, gimme a shout if you get stuck