Search results

  1. Skydiver

    Having issues with C# code (New to C# !)

    Your lines 10-16 look to be code that was meant to be put into a console program, but you are trying to put it into a WinForms program.
  2. Skydiver

    Having issues with C# code (New to C# !)

    If you are running as 32-bit and try to load a 64-bit DLL, or vice versa, you can get that error. Alternatively, but less common, if someone decided to modify the assembly by doing some IL or resource hacking, and the strongly signed assembly can also fail to load with the same type of error.
  3. Skydiver

    Resolved Convert true/false bool to letters/text output

    I learned 2 new things today: You can put quotes inside the interpolated part without having to do any special escaping. Ternary operators within string interpolation need to be in parenthesis. bool good = true; var s = $"Today is a {(good ? "good" : "bad")} day."; Without the parenthesis...
  4. Skydiver

    Resolved Diary program

    When posting code, please put the text of your code in code tags. There simplest way to do this is to use the toolbar button and the text area that looks like </>.
  5. Skydiver

    Resolved Diary program

    See post #5.
  6. Skydiver

    Question C# Async code doesn't work on Visual Studio Release mode, works perfectly well on debug mode (with or without attaching the debugger)

    See: https://devblogs.microsoft.com/pfxteam/await-synchronizationcontext-and-console-apps/
  7. Skydiver

    Question Journal program

    See @Yas 's thread where he is showing his code and asking specific questions about the issues he is running into. You should do the same thing and write your code, and then show us the code that you are running into issues with and give us specific questions.
  8. Skydiver

    Resolved Diary program

    It looks like you are trying to write a console app. By default, a console app doesn't have GUI elements like a Label. It looks like you are trying to access some control named labelName and put a value into it. If you are truly writing a GUI app, you'll need to get a reference to your GUI...
  9. Skydiver

    Resolved Diary program

    C# is case sensitive. On line 34 you declared fileName with a capital N. On line 36 you are trying to use filename with a lowercase N.
  10. Skydiver

    Resolved Diary program

    Nevermind. That other thread is by @Reik . I won't merge threads. Can you tell us what part you are struggling with?
  11. Skydiver

    Resolved Diary program

    This seems related to your other thread. I'm going to try move this into that thread so that people will have more context about what you are trying to do.
  12. Skydiver

    Question learning with .Net framework 3.5 and 4.0?

    There's really no need to quote the post above yours, you second deleted reply should have been sufficient. Anyway, yes, you can learn using an older version of the NET framework, ASP.NET, SQL, language, but: You are exposing your machine to higher security risks by having those versions on...
  13. Skydiver

    How to loop through JSON data?

    With the debugger, did you check which of those properties was null? That would then tell you which part failed to deserialize correctly. JSON.NET will match JSON field name to C# property name. As I said, your class names and properties are really hard to read. To make matters worst, I think...
  14. Skydiver

    Question C# Async code doesn't work on Visual Studio Release mode, works perfectly well on debug mode (with or without attaching the debugger)

    Umm, Windows console apps do not have an event loop. Perhaps you were thinking NodeJS? If you write that same code in WinForms or WPF, the default synchronization context there will not use other threads for the async/await. Alternatively, you can write a custom synchronization context that...
  15. Skydiver

    Protocol Design

    I personally thought that the UML Distilled books were great, but I also had a slight background on the pre-cursor of UML having been exposed to some of the Grady and/or Booch books in college.
  16. Skydiver

    Protocol Design

    This doesn't seem like a C# specific question. Protocols typically are language agnostic (albeit some protocols are easier to handle in some languages vs. others). Design while playing with UML Use Case and Data Flow diagrams. That will likely inform you of the types of interactions that you...
  17. Skydiver

    Question C# Async code doesn't work on Visual Studio Release mode, works perfectly well on debug mode (with or without attaching the debugger)

    From what I am seeing while trying to reproduce the problem, it looks like you are running into the too many context switches between all the threads. On release builds, I'm seeing something close to 200 threads, but on debug builds its only about 100 threads. Strangely, if I replace the Ping...
  18. Skydiver

    How to loop through JSON data?

    So what problem are you encountering? Wouldn't it just be a matter of looping through the TASK_O property of the result.Outputdata.TASK_O? (It might help if you named your types and members actually correspond to your JSON so that is no confusion.)
  19. Skydiver

    Question C# Async code doesn't work on Visual Studio Release mode, works perfectly well on debug mode (with or without attaching the debugger)

    I'm assuming that you have permission from your network admin to flood the network with all those pings. Just to verify, the debug build works correctly with 5000 IP addresses, it is only the release build that cannot handle 5000 IP addresses?
  20. Skydiver

    Xonix C#

    I thought that batch file was your creation. Was it from someone else? Hopefully to they have an explanation.
Top Bottom