CodingSup3rnatur@l-360's Profile User Rating: *****

Reputation: 916 Master
Group:
Mentors
Active Posts:
921 (0.96 per day)
Joined:
30-September 10
Profile Views:
22,349
Last Active:
User is offline Today, 02:53 PM
Currently:
Offline

Previous Fields

Country:
GB
OS Preference:
Windows
Favorite Browser:
Chrome
Favorite Processor:
Intel
Favorite Gaming Platform:
XBox
Your Car:
Who Cares
Dream Kudos:
425
Expert In:
C#

Latest Visitors

Icon   CodingSup3rnatur@l-360 My status

Posts I've Made

  1. In Topic: DispatcherTimer thread Question

    Posted 5 Apr 2013

    Quote

    i know that the DispatcherTimer will run on it on seperate thread


    Actually, the DispatcherTimer's Tick event is raised on the UI thread.

    Quote

    would the getX function be running on the same thread as the DispatcherTimer thread


    Yes.
  2. In Topic: WPF Minimize window when windowstyle ="None"

    Posted 2 Apr 2013

    To get the hosting window, you can use the window.GetWindow() method, passing in a reference to the hosted DependencyObject (your Page in this case).
  3. In Topic: Using Generic List

    Posted 23 Mar 2013

    This:

    Dim p2 As People
    


    is just declaring a variable that points to nothing. You need to instantiate a People object to be able to use it, like so:

    Dim p2 As New People("Name")
    


    Now p2 refers to the new Person object, and you can use it.

    If, on the other hand, GetCustomer() is meant to be a Factory Method that creates a new People object with the specified name, you want GetCustomer() to be marked as Shared, and you want it to return a Person object, rather than a String.

    For example (I've changed the name of the method to reflect what it now does):

    Public Shared Function CreateCustomer(ByVal name As String) As People
        Return New People("New " & name)
    End Function
    
    


    You can then call it like this:

    Dim p As New List(Of People)
    Dim p2 As People = People.CreateCustomer("Howard")
    p.Add(p2)
    
    


    However, having a method called CreateCustomer() that returns a People object is a bit bizarre, as is having a People class that takes a single name in its constructor (should the class be called Person instead?), so you may have to explain what you are trying to do a bit more.
  4. In Topic: C# - Detecting key press in text box and receiving EventHandler errors

    Posted 22 Mar 2013

    The EventHandler delegate is expecting you to pass it a method with the following signature and return type:

    void YourMethod(object sender, EventArgs e)
    


    Compare that to the signature of your TextBox_KeyDown method.

    Happily, there is a built in delegate that can reference a method with a signature and return type like your method's that you can you use instead - KeyEventHandler.

    If you look at the MSDN pages for a given delegate (like the two I linked above), you can see the signature and return type of the method they can handle from their declaration displayed in the 'Syntax' section of the page. Also, in Visual Studio, if you type this.TextBox.KeyDown +=, and then hit tab, it should insert the right hand operand of the += operator for you. EDIT 2: Finally, note that you can get the delegate type that backs a given event on the event's MSDN page - Control.KeyDown. Note the KeyEventHandler part in the declaration of the event. You should use the same delegate type when subscribing to an event as is used in the declaration of the event.

    EDIT:

    Note that if you are using C# 2.0 or above, you can let the compiler decide what delegate to use using the method group conversion feature, as so:

    this.TextBox.KeyDown += this.TextBox_KeyDown;
    
  5. In Topic: Should I Use Classes The Ways I Have Been?

    Posted 22 Mar 2013

    Yes, I think you've got it. The rich text box is ultimately contained in the form, so it won't outlive the form.

My Information

Member Title:
D.I.C Addict
Age:
20 years old
Birthday:
June 11, 1992
Gender:
Location:
United Kingdom
Interests:
Rock/metal music - Led Zeppelin, Guns N' Roses, Metallica, Nirvana, AC/DC etc
Sport
Coding. Love C#, in particular.
Watching Supernatural.
Online gaming (Xbox 360).
Full Name:
Jason
Years Programming:
3
Programming Languages:
C#, a bit of Actionscript 3.0 ,SQL,Progress4GL, VB.NET. Learning Java, and Assembly/C/C++ when I can.

Contact Information

E-mail:
Click here to e-mail me

Comments

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

    strawhat89 Icon

    13 Aug 2012 - 06:01
    A Supernatural fanatic huh?
  2. Photo

    raziel_ Icon

    13 Sep 2011 - 11:31
    Just stalking your profile :P
  3. Photo

    smohd Icon

    03 Jul 2011 - 15:49
    Thank you, and congratulations for Mentor badge. Doing great in C#
  4. Photo

    CodingSup3rnatur@l-360 Icon

    03 Jul 2011 - 08:25
    It's no problem at all, and thanks a lot! I am extremely grateful to be recognised in such a big way!
  5. Photo

    macosxnerd101 Icon

    02 Jul 2011 - 19:19
    Thanks for all your hard work! Welcome to the cyan club!
  6. Photo

    MATTtheSEAHAWK Icon

    07 May 2011 - 12:26
    Congratulations on Expert! Purple nurple :P
  7. Photo

    CodingSup3rnatur@l-360 Icon

    04 May 2011 - 13:32
    Thanks! I couldn't believe it when I saw my name in purple this morning. Thought I'd gone colour blind overnight... It was a very nice surprise :)
  8. Photo

    Curtis Rutland Icon

    04 May 2011 - 06:30
    Hey, grats on the promotion to Expert!
  9. Photo

    ishkabible Icon

    27 Apr 2011 - 13:19
    relatively speaking however, your better. e.g. your skill in C# surpasses my skill in C++ as far as i can tell. you have nearly 1 rep per post o_0. other experts have commented on the extend of your knowledge. keep up the good job :)
  10. Photo

    MATTtheSEAHAWK Icon

    24 Apr 2011 - 14:45
    Thanks! I was working on it until 3:30 am xD
    I was like "I have to finish this!". Are you doing one?
  11. Photo

    ishkabible Icon

    20 Apr 2011 - 19:23
    how on earth did you get that good at programing in a year? f'ing genius...
  12. Photo

    Curtis Rutland Icon

    21 Mar 2011 - 10:42
    Another tutorial added to the Learning C# Series! Keep up the good work!
  13. Photo

    Curtis Rutland Icon

    01 Mar 2011 - 12:04
    Thanks for contributing to the Learning C# Series!
  14. Photo

    CodingSup3rnatur@l-360 Icon

    25 Feb 2011 - 15:54
    @ishkabible - yeah, that looks a lot better. What actually is the limit when you register I wonder... Is there a limit, or could someone technically have a name of like 1000 letters that just swallows the whole page?
  15. Photo

    Neetu sharma Icon

    25 Feb 2011 - 11:52
    hello
  • (2 Pages)
  • +
  • 1
  • 2