Skydiver's Profile User Rating: ****-

Reputation: 3961 Guru
Group:
Moderators
Active Posts:
12,635 (11.34 per day)
Joined:
05-May 12
Profile Views:
60,616
Last Active:
User is offline Yesterday, 06:19 PM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Windows
Favorite Browser:
Chrome
Favorite Processor:
AMD
Favorite Gaming Platform:
PC
Your Car:
Toyota
Dream Kudos:
100
Expert In:
C/C++, C#

Latest Visitors

Icon   Skydiver has not set their status

Posts I've Made

  1. In Topic: Trying to get ID of selected row from datagrid

    Posted 23 May 2015

    View Postdanbywinby, on 23 May 2015 - 07:25 AM, said:

    I have made it so that all my datgrid is using now is 'Strings':
    :
    But still i am getting the exact same message.

    I even edited the XAML:
    :


    Yes, but you have done nothing to to make the objects in the observable collection to be printable. Consider this dead simple code:
    class Person
    {
        public string Name { get; set; }
    }
    
    class TestShell
    {
        public static void Main()
        {
            var person = new Person() { Name = "danbywinby" };
    
            var display = person.ToString();
            Console.WriteLine(display);
            Console.ReadLine();
        }
    }
    
    


    Try running it and notice that it will also just print out just type of Person instead of the value of Name that you seem to be expecting.

    This is exactly what is happening. You are getting back an object of type Demo_Grid_Data in your Demo_SelectedDataGridItem.

    As mentioned above, consider overriding ToString(): How to: Override the ToString Method (C# Programming Guide)
  2. In Topic: Need to Speedup a Calculation

    Posted 22 May 2015

    I added counting the distinct names into my simulation. It's that operation that is bumping up the time it takes to compute things:

    Quote

    Ignore Names, Multi-pass elapsed time: 110
    Ignore Names, GroupBy elapsed time: 112
    Ignore Names, Single-pass elapsed time: 28
    Count Names, Multi-pass elapsed time: 268
    Count Names, GroupBy elapsed time: 234
    Count Names, Single-pass elapsed time: 229
    Single-pass including names elapsed time: 155
    Ignore Names, Multi-pass elapsed time: 107
    Ignore Names, GroupBy elapsed time: 111
    Ignore Names, Single-pass elapsed time: 31
    Count Names, Multi-pass elapsed time: 271
    Count Names, GroupBy elapsed time: 270
    Count Names, Single-pass elapsed time: 167
    Single-pass including names elapsed time: 166
    Ignore Names, Multi-pass elapsed time: 107
    Ignore Names, GroupBy elapsed time: 94
    Ignore Names, Single-pass elapsed time: 27
    Count Names, Multi-pass elapsed time: 236
    Count Names, GroupBy elapsed time: 284
    Count Names, Single-pass elapsed time: 186
    Single-pass including names elapsed time: 175
    Ignore Names, Multi-pass elapsed time: 101
    Ignore Names, GroupBy elapsed time: 90
    Ignore Names, Single-pass elapsed time: 27
    Count Names, Multi-pass elapsed time: 248
    Count Names, GroupBy elapsed time: 274
    Count Names, Single-pass elapsed time: 167
    Single-pass including names elapsed time: 184
    Ignore Names, Multi-pass elapsed time: 96
    Ignore Names, GroupBy elapsed time: 91
    Ignore Names, Single-pass elapsed time: 27
    Count Names, Multi-pass elapsed time: 245
    Count Names, GroupBy elapsed time: 287
    Count Names, Single-pass elapsed time: 183
    Single-pass including names elapsed time: 171


    I was using the stock HashSet in my "Single pass including names" which is essentially the same as the Set used internally by Distinct().

    Spoiler
  3. In Topic: Advice: Base program + optional plugins

    Posted 22 May 2015

    Look into Managed Extensibility Framework.
  4. In Topic: C# Stops Executing When Opening A Connection To MySql

    Posted 22 May 2015

    If it's the calls to MySQL that is failing, then exceptions should have been thrown. Add a MessageBox call within your exception handler just to ensure that you really are not missing any exceptions.

    I don't know if MySQL needs to be running on a particular flavor of thread (eg. STA, UI, etc.) and if the DataChange events fired by OPC satisfies the requirements of MySQL. It maybe something to look into if no exceptions are being thrown.

    Additionally, in Visual Studio, make sure to uncheck the "Just My Code" under the debugging options. It's possible that VS is trying to help you by hiding the MySQL or OPC code when the exception is thrown.
  5. In Topic: C# Stops Executing When Opening A Connection To MySql

    Posted 22 May 2015

    View Postdan789, on 22 May 2015 - 09:54 AM, said:

    View PostSkydiver, on 22 May 2015 - 06:51 AM, said:

    But are keep the instance of that external class alive? This is why I suggested that you make the variable members of the current form which you know is alive.


    What do you mean by Alive?


    Keep a reference to that class within a class that you know active. Read about garbage collection here.

My Information

Member Title:
Code herder
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Interests:
programming, shooting, skydiving, scuba, photography, game dev, cryptography, design patterns, agile methodologies, scifi, fantasy,
Years Programming:
33
Programming Languages:
C, C++. C#, PHP, JavaScript, Pascal, SQL, BASIC, Forth, x86, 65000, 65xx,

Contact Information

E-mail:
Private

Comments

  • (2 Pages)
  • +
  • 1
  • 2
  1. Photo

    tarmizi_adam2005 Icon

    08 Mar 2014 - 09:03
    Congrats on the 3k rep ! also, before your rep changes nice palindrome rep, 3003.
  2. Photo

    tarmizi_adam2005 Icon

    27 Nov 2013 - 18:56
    Just wanted to stop by and say thanks on the advices you gave in my post (read wav files C/C++) the other day.
    Thanks again Skydiver
  3. Photo

    raspinudo Icon

    03 Jul 2013 - 05:51
    Nice Star Trek t.n.g. Reference
  4. Photo

    todddowers Icon

    26 Jun 2013 - 23:07
    hello i was wondering do you know anything about text based games.
  5. Photo

    CY5 Icon

    10 Jun 2013 - 07:07
    Thanks SkyDiver you're always there to help on C# forum
  6. Photo

    Jovel Mark Icon

    05 Mar 2013 - 23:51
    salamat sa pagtulong .. keep it up the work..
    kung wala kamo wala kami mahimo sang amon nga project ba,, madamo gd nga salamat sa pagtabang..
  7. Photo

    tlhIn`toq Icon

    30 Dec 2012 - 16:20
    Congrats on the Mentor badge. I think that is new record. Glad to have you on board.
  8. Photo

    lp94 Icon

    07 Oct 2012 - 06:09
    thank you soooooo much <3
  9. Photo

    kai_itz me Icon

    25 Sep 2012 - 04:40
    i agreed with MrShoes.
    More knowledgeable than many; more patient than most.
    very well said :)
  10. Photo

    tlhIn`toq Icon

    01 Sep 2012 - 15:22
    I just saw the Expert badge... Well done!
  11. Photo

    nazzie Icon

    22 Aug 2012 - 00:34
    Thanks for your Help! Keep up the good work.. thanks so much! ^_^
  12. Photo

    vikuseth Icon

    17 Aug 2012 - 23:12
    hi
    thanks for helping me in Dll issue .
    you are the best. ..
    good luck...
  13. Photo

    MrShoes Icon

    08 Aug 2012 - 00:49
    More knowledgeable than many; more patient than most.
  14. Photo

    BarackObama Icon

    31 Jul 2012 - 00:59
    This guy is the best! Love him
  15. Photo

    DimitriV Icon

    26 Jul 2012 - 01:34
    Wow! You're shooting up the ladder now! Only two and a bit months and already an Expert. Congrats!
  • (2 Pages)
  • +
  • 1
  • 2