CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: jonlist

Search: Search took 0.02 seconds.

  1. Replies
    26
    Views
    3,720

    Re: Questions regarding C#

    something like this:


    private void button1_Click(object sender, EventArgs e)
    {
    var db = new testdbDataContext();
    db.Users.InsertOnSubmit(new User() { User1 = textBox1.Text }); //ID is...
  2. Replies
    7
    Views
    1,103

    Re: Best way to insert new data into files?

    Sorry, i just meant, that it is great when you encounter a problem that makes you realize that the structure of your program can be improved
  3. Replies
    7
    Views
    1,103

    Re: Best way to insert new data into files?

    Refactoring is great
  4. Replies
    4
    Views
    3,025

    Re: Compilation errors

    As already mentioned C# does not support nested functions. (at least not without the use of delegates and anonymous functions)
    Define the "find" method outside the main method, and make it static so...
  5. Re: questions about Fields, static non-static etc

    I'm guessing you are trying to access a member of an object inside a static method of that class that created the obejct?

    This is not possible.
    A static method is method on the class, not on the...
  6. Replies
    26
    Views
    3,720

    Re: Questions regarding C#

    To create the local DB:
    In the menu bar click View->Server Explorer.
    In the Server Explorer right click Data Connections and click add connection
    Select Microsoft SQL Server Database File
    Give...
  7. Thread: Moving objects

    by jonlist
    Replies
    6
    Views
    2,504

    Re: Moving objects

    WPF is .NET, i think it was added in .NET 3.5.

    It's just an alternative to the normal forms. You can edit the design of the forms with XML, much like you would edit a web page with HTML.

    If you...
  8. Replies
    1
    Views
    8,072

    Re: websockets server trouble

    Well, i figured it out.

    If written a small article on codeproject.com about the result. Go check it out if you are interested:...
  9. Replies
    4
    Views
    8,361

    Re: delegates and event driven programming

    This is a great example of events:

    http://msdn.microsoft.com/en-us/library/aa645739(VS.71).aspx
  10. Thread: Moving objects

    by jonlist
    Replies
    6
    Views
    2,504

    Re: Moving objects

    I haven't really worked with it, but WPF together with Expression Blend, could make your life a little easier.

    Expression Blend is a Microsoft program for designers, et enables you to animate and...
  11. Replies
    10
    Views
    1,106

    Re: Need help with ineritance tree, new to C#

    Int32 FileCheck() and Int32 FolderCheck() are both private, set them to protected and you should be able to access them from the CreateFolder class.

    BaseFolderPath, FolderName and FileName should...
  12. Replies
    6
    Views
    8,000

    Re: operator overloading

    I made an app once that required some math structures like vectors and matrices. I overloaded the operators on the classes i created in order to get the same behavior in the app as in math:
    Ex:...
  13. Replies
    5
    Views
    1,160

    Re: Difference between Debug and Install?

    Maybe you have some assemblies in you debug directory that are not properly bundled in the installation package?
  14. Replies
    6
    Views
    6,315

    Re: Html decode?

    If it is the id attribute of the buttons you are talking about then I would also suggest used a different identifier. If you have an auto incrementer on the rows in the database, this would be an...
  15. Replies
    4
    Views
    723

    Re: Number of signs for an int variable?

    how about:


    int CountSigns(int value)
    {
    int length = value.ToString().Length;
    if(value < 0)
    lenght++;

    return length;
  16. Replies
    5
    Views
    1,035

    Re: String2DataType function

    So you have the name of the type and you want to cast and object to that type.

    Somebody have had a similar problem over at stack overflow check it out, it might help you:...
  17. Replies
    11
    Views
    7,670

    Re: C# good alternatives to C++/goto statement

    continue:
    http://www.core.org.cn/sofia/gallery/java/unit06/continue_syntax_lg.gif
    break:
    http://www.core.org.cn/sofia/gallery/java/unit06/break_syntax_lg.gif
  18. Replies
    6
    Views
    3,995

    Re: Shuffling a deck of cards

    I'd make a Card class and a Deck class and enums for the suit, somthing like this:


    enum Suit { Heart, Diamond, Spades, Club };
    class Card
    {
    public Suit Suit { get; set; }...
  19. Thread: store data

    by jonlist
    Replies
    4
    Views
    855

    Re: store data

    XML and LINQ are really creat for that kind of stuff.
    Take a look at this: http://www.hookedonlinq.com/LINQtoXML5MinuteOverview.ashx

    You could make an XML file looking somthink like this:
    ...
  20. Replies
    6
    Views
    1,067

    Re: Simple Calculator Problem

    I'd initialize the operand at the top, instead of just declaring it:
    string operand = "+";

    That way you'd know if it was ever assigned something else. But now that i think about it you'd prolly...
  21. Replies
    1
    Views
    8,072

    websockets server trouble

    I'm trying to implement a C# web socket server, but its giving me a few troubles.
    I'm running a webserver(ASP.NET) to host the page with the javascript and the web socket server is implemented as a...
  22. Replies
    0
    Views
    2,525

    Editor development, storing data with text

    Hi

    I'm developing a (very) simple editor (more like a proof of concept thing - but anywho..)

    I just finished the plugin framework and stated to create a "snippet" plugin for the editor, when i...
Results 1 to 22 of 22





Click Here to Expand Forum to Full Width

Featured