Search results for query: *

  1. E

    Async and Await Query

    What editor are you using? ...in visual studio you would have warnings .e.g CS4014 which implies that the processing order is not guaranteed. What are you trying to achieve; if we knew that; our advice would be far more helpful.
  2. E

    need help with deserializing a json file

    Copy and paste the returned JSON here. https://app.quicktype.io/
  3. E

    read csv file but it only reads the first line

    Extension Methods like ToBinary are defined in a static class; and you can identify it as an Extension Method because it uses the this keyword on the 1st parameter; which is the data type that you are extending with this dot (extension) method. So for example; you can define it similar to this...
  4. E

    read csv file but it only reads the first line

    For further clarity here's an example to compute the headers (as a List) and similarly the binaries (as a List) var path = "../groceriess.csv"; var rows = File.ReadAllLines(path).Select(s => s.Split(",").ToList()); var headers = rows .SelectMany(s => s) .Distinct() .OrderBy(s => s)...
  5. E

    read csv file but it only reads the first line

    Quite possible... My interpretation is as follows: This for me implies that ALL distinct elements should be used for headers. No exclusions. The second operation is then to compute binaries as you described.
  6. E

    read csv file but it only reads the first line

    That's not what the OP describes with his example in post #10 ?: No items were left out?
  7. E

    read csv file but it only reads the first line

    It was never meant to be a complete solution... merely a pointer to the 1st challenge, namely: All he'd have to do is to compute the distinct elements in the returned list; and he'd have his header. The binary match up part is rather easy once you have your header... ...naturally for that...
  8. E

    read csv file but it only reads the first line

    Alternative method: Read all text from file Replace end of line characters with a comma Spilt string on comma
  9. E

    How to prevent UI blocking in WPF

    Have you tried something along the lines of this? Task.Factory .StartNew(() => DataManagerRealTimeAgent.GetAgentData(selectedGroups)) .ContinueWith(t => App.Current.Dispatcher.BeginInvoke(new Action(() => { RealTimeAgentData = t.Result; })));
  10. E

    ListBox, Multi-Column effect?

    It's not an ASP.net problem. I suggest you have a look at incorporating one of the many front end styling frameworks with ASP.net, for example: Bootstrap ...and its many alternatives ...and then look at how they style multicolumn list layouts.
  11. E

    How to prevent UI blocking in WPF

    Your description is IMHO lacking some details: What is the DB Is it running on separate hardware; separate from UI. How are you accessing the DB; e.g. SQL, SOAP, JSON, ... Brief description of how the DB is updated; is this e.g. from the UI(s), or other... Frequency of data updates; does the...
  12. E

    C# Generic collections - Get list of sub level child items from parent object

    The code you shared is incomplete / laced with errors. Its not clear what you're trying to accomplish. I suggest you start by posting a working example of your code, and then describe what you're trying to accomplish with the Linq statement.
  13. E

    Multiple home page for different clients

    Agreed. With templated html; its quite normal to break the task up into small bits that can be logically composed; how far the OP would need to take this is really going to depend on the extent of the level of customization differences amongst clients, for example: CSS styling only would be...
  14. E

    Multiple home page for different clients

    I'm assuming it's ASP.Net related. If so then read up on View Engines for ASP; more specifically on how to create templates for that. The simpler route would be to keep things as close to traditional HTML and CSS as possible; because then styling can be adjusted without recompilation.
  15. E

    Question CodeDom Related in Manipulating a string(s)

    Consider using $ string interpolation; it'll simplify your Writeline statements, for example: Console.WriteLine($"The Information in {Textbox1.Text} is Correct!");
  16. E

    Why do some Methods not require a specified class? (Extremely basic question)

    I suggest you learn to test your conclusions, for example, you state that "class initialization is also required for static methods... " public class Test1 { public static void DoesITWork() { Console.WriteLine("Test1 worked"); } } public static class Test2 { public static...
  17. E

    Why do some Methods not require a specified class? (Extremely basic question)

    Class methods / instance methods are by themselves not initialized... because they are an inherent part of the class definition they require the class that contains them to be initialized before they can be used. Normally it's easy to spot an initialization of a class by the use of the new...
  18. E

    Why do some Methods not require a specified class? (Extremely basic question)

    My bad... its an order of precedence problem. The extension methods essentially do work as I indicated; however the order of precedence in C# makes it appear as if it doesn't. C#'s order of precedence internal rules stipulate that dot method calls are processed before prefix operators, so the...
  19. E

    Why do some Methods not require a specified class? (Extremely basic question)

    Also int is an integral type and not a class type like string; so they originally. did not have any dot chained methods that you'd typically find for a class type like string; however since the addition of extension methods you can add this yourself to any type including integral types like...
  20. E

    Why do some Methods not require a specified class? (Extremely basic question)

    Class methods These methods operate on the internal properties of a class, and are only available for use after a class has been initialized. In this context; string is a class, and ToUpper is a method that accesses the internal stored string property value of the class and uses it to compute...
Back
Top Bottom