View Poll Results: Does this forum need a sticky 'You're doing it wrong' thread?

Voters
16. You may not vote on this poll
  • Yes, it's a great idea! I like it.

    13 81.25%
  • No, I don't like it. The idea sucks.

    3 18.75%
Results 1 to 17 of 17

Thread: You might be doing it wrong!

Threaded View

  1. #1

    Thread Starter
    PowerPoster cicatrix's Avatar
    Join Date
    Dec 2009
    Location
    Moscow, Russia
    Posts
    3,654

    Lightbulb You might be doing it wrong!

    Just a thought. What do you think about a sticky thread where we can assemble typical mistakes people make when start programming in .Net?

    For example, literally every day a new person appears here having difficulties with:

    Code:
    Int(TextBox1.Text)
    then some other man with vb6 background who uses Val(TextBox1.TexT).

    Another person starts using default form instances and is happy because it's actually working:

    Code:
    Form2.TextBox1.Text = "Hello!"
    Another man comes with more serious problem showing this:

    Code:
    Dim sqlquery As String = "SELECT password FROM users WHERE username=" & txtName.Text
    Yet another new member is having troubles with the 'Cross thread operation is not valid' when he attempts to access a usercontrol member from another thread, etc

    What do you think, will this forum benefit from having such a thread? If so, then what other topics can you suggest to add?

    UPDATE

    I'll be posting a list of topics to include. The topics so far are:

    You're doing it wrong if:
    (explanations fill follow later)

    ... you're using the Int function with a textbox to obtain a numeric value;

    ... you're using the Val function;

    ... you're using form's names to refer to their instances (Form1, Form2, etc);

    ... you're constructing your SQL query right from TextBox values;

    ... you're directly accessing form's controls from a different thread;

    ... you're wondering if "2" + "2" results in "22" and not 4;

    ... you're using the Shell command;

    Please, feel free to add/discuss.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width