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

Search:

Type: Posts; User: Jim_Auricman

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Re: [RESOLVED] Accessing console applications from a command window

    Thanks, Arjay. I'll check into using a post build event, as that might be useful to do in some cases.
  2. Re: Accessing console applications from a command window

    Thanks for your responses.
    Each project has its own BIN directory. Using a Utility directory whose path is in the environment allows access more easily than specifying each project's BIN path when...
  3. Re: Accessing console applications from a command window

    That's exactly what I do; The disadvantage is that when a new version of a Console application is made, the new version has to be re-copied to the utility folder.
    "Utility folder that has a public...
  4. Re: Accessing console applications from a command window

    The problem with using a shortcut to access a console application is that inputting parameters is problematic.
    You can use Console.ReadLine() to input the parameters, but if you have 3 or 4...
  5. [RESOLVED] Accessing console applications from a command window

    I develop both Windows Forms and Console applications in C#.
    The forms applications are easy to access by creating a shortcut on the desktop pointing to the executable file in one of the BIN...
  6. Re: using break statement in a while loop

    Coding standards were developed because frequently someone else will have to maintain your code, and having the code work will not necessarily make it understandable and maintainable. Using "break"...
  7. Re: using break statement in a while loop

    If you use the while statement as follows:

    bool finished = false;

    while ((!finished) && (!_backgroundWorker.CancellationPending))
    {
    //When the exit condition is met-
    finished =...
  8. Re: System.Random is a type but is used like a variable

    You just need 6 variables:
    int con1 = rng.Next(0, 17);
    int vo1 = rng.Next(0, 5);
    int con2 = rng.Next(0, 17);
    int vo2 = rng.Next(0,...
  9. Re: System.Random is a type but is used like a variable

    The code is doing what you told it to do in this statement:
    Console.WriteLine(conlist[con] + volist[vo] + conlist[con] + volist[vo] + conlist[con] + volist[vo]);
    since you are only using one index...
  10. Re: System.Random is a type but is used like a variable

    Thanks, BPE.
    x = Console.ReadLine();
    This line also needs to be within the do-while loop, otherwise x never gets updated.
  11. Re: System.Random is a type but is used like a variable

    int con = rng.Next(0, 21);

    The conlist is only 17 elements, but con could be as large as 21, so eventually it may crash by being out of bounds.
  12. Re: Having trouble building this converter without using goto

    I made a couple minor changes to your structure:


    string eval = "";
    bool finished = false;

    while (!finished)
    {

    ...
  13. Thread: Zeros...

    by Jim_Auricman
    Replies
    12
    Views
    1,179

    Re: Zeros...

    Believe it or not, I have seen code that used multiple entry into functions. Back in the days when code space and execution time was very critical, some functions were written with several different...
  14. Thread: Zeros...

    by Jim_Auricman
    Replies
    12
    Views
    1,179

    Re: Zeros...

    "Yes, if you really want to avoid multiple returns then this is the way to do it. But it isn't as easy to read as the solution given by BioPhysEngr (with my correction). "

    If you follow the coding...
  15. Thread: Zeros...

    by Jim_Auricman
    Replies
    12
    Views
    1,179

    Re: Zeros...

    Here is another solution:


    string stripZero(string OriginalNumStr)
    {
    string ModNumStr = OriginalNumStr;
    int DotIndex = OriginalNumStr.IndexOf('.');

    ...
  16. Re: Reading text file by character

    You might want to try reading in using a BinaryReader and writing out using BinaryWriter.
    BinaryReader r = new BinaryReader(fs);

    binWriter = new...
  17. Re: C# can't figure out whats going wrong

    You didn't mention what the problem is, but
    if (grade > 50)
    {
    GPA = 0.0;
    }
    so any grade above 50 will yield a GPA of 0.0. I don't think you want that.
  18. Replies
    18
    Views
    1,766

    Re: Please don't cringe

    No, you are not in the minority. If you make it a popularity contest, of course you will win.
    People like to take the easy way out and don't care about who has to maintain their code later.
    If you...
  19. Replies
    18
    Views
    1,766

    Re: Please don't cringe

    BPE, I have programmed using coding standards that strictly forbade the use of goto, continue and multiple returns from a function. I didn't write the standards, but I agreed with them and followed...
  20. Replies
    18
    Views
    1,766

    Re: Please don't cringe

    BPE, I share your aversion to goto, but I have a similar aversion to 'continue'. I have never used it, since it is easily avoided.
    Assuming your code is correct (I haven't tested it), I have...
  21. Re: Cannot implicitly convert type "string" to "int"

    You have guess defined as an int, but Console.ReadLine() returns a string. That is the mismatch. That's why I gave you this line:
    string guess_str = Console.ReadLine();
    Then you can convert it to...
  22. Re: Cannot implicitly convert type "string" to "int"

    BioPhysEngr, I agree that using "goto" is a bad practice. But why do modern languages, including C#, allow its usage? It is an unnecessary statement so it shouldn't be included in the language.
  23. Re: Cannot implicitly convert type "string" to "int"

    The guess string must be converted to an int before the comparison takes place.
    Here are a few hints:


    guess_str = Console.ReadLine();
    guess_str =...
  24. Re: MDB DataTable Fehler OleDbAdapterUpdate.Udate()

    Vielleicht wenn Sie die Frage auf Englisch stellen würden, würde jemand verstehen und Ihnen helfen.
  25. Re: Need streamreader to read content of multiple files

    I think you mean a wildcard "*.txt" rather than ".txt" in the Directory.GetFiles() function call.
Results 1 to 25 of 71
Page 1 of 3 1 2 3


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a Codeguru.com survey!


HTML5 Development Center