Search results

  1. J

    Resolved Create Net 5 UserControl

    The obvious first step is to search for the error code and find out what it means and what existing solutions there may be.
  2. J

    This site is for questions regarding C# development. The Installation forum is for questions...

    This site is for questions regarding C# development. The Installation forum is for questions regarding installing your C# applications. Your question regarding installing Windows has been deleted for that reason.
  3. J

    Question Hexadecimal vs integers

    It's a case of hexadecimal vs decimal, not hexadecimal vs integer. As suggested, hexadecimal and decimal are just ways of displaying integers with different bases: 16 or 10. In the vast majority of cases, you'll use decimal. Hexadecimal is most often used for constants for API calls. If you...
  4. J

    Resolved Create Net 5 UserControl

    It's the directive that tells the IDE to include the WinForms package for .NET 5. I expect that you'll always need it, but the hope would be that they add a project template that does it for you, just as they have with the WinForms application project. I worked out that you could get a class...
  5. J

    Resolved Create Net 5 UserControl

    Look at the project in the Solution Explorer thoroughly before and after and you'll see what the difference is.
  6. J

    Foreach in not iterating through values

    You need to debug the code and explain EXACTLY what is happening. Execution doesn't just jump out of a loop for no reason. Assuming your system isn't broken in some way, either you're exiting the loop explicitly, or there are no more items in the list being enumerated or an exception is being...
  7. J

    Question New to coding

    I have to agree with @Skydiver. Using a video for a specific task you're having issues with is one thing but learning by videos alone is generally what lazy people do. They think they're absorbing information but they are just copying what they see and are still unable to do things for...
  8. J

    Question CustomPropertyGrid with CustomCollectionEditor - Detecting a change in the collection

    I've never done what you're doing so I don't know the details of how it's usually done but I would assume you are calling CreateCollectionForm and then calling ShowDialog on that form. That method will return a result that indicates which button was clicked and you can do whatever you want with...
  9. J

    Question CustomPropertyGrid with CustomCollectionEditor - Detecting a change in the collection

    Did you actually mean that you CAN'T detect it?
  10. J

    Resolved Cast base object to an inherited object

    There's no need to cast if the member is declared abstract or virtual. In case you're not clear on the distinction, you would use abstract if you wanted to declare the member in the base class but only provide an implementation in each base class, while you would use virtual if you wanted to...
  11. J

    Resolved Cast base object to an inherited object

    It's pretty rare that dynamic should be used. It's the sort of thing that some people might use to hide problems rather than solve them. It can be used to provide late-binding for things like Office Automation, like Option Strict Off in VB, and it serves a purpose for things like the ViewBag...
  12. J

    Resolved Cast base object to an inherited object

    The important question is WHY. You're telling us what you're trying to do and you're showing us how you're trying to do it but you're not explaining what problem you think you're solving by doing this. It is almost certainly misguided. The whole point is that you DON'T cast the base reference...
  13. J

    Resolved Cast base object to an inherited object

    Think about what that first example is doing. The toy parameter is declared as type Toy. What exactly do you think this does: toy = (Ball)toy; It doesn't matter what you do on the righthand side because you assign the result to the toy variable. If toy is declared as type Toy, how could you...
  14. J

    Resolved Create Net 5 UserControl

    WinForms support in .NET 5.0 is still a bit rough around the edges. There's no Windows Control Library project template like there is for .NET Framework. I just created a C# Class Library (.NET Core) project and then edited the project file from this: <Project Sdk="Microsoft.NET.Sdk">...
  15. J

    Resolved WinForm - SQL transaction.Commit() waiting to complete?

    That couldn't possibly be the case. Even if the transaction was committed asynchronously, all the data would already have been sent to the database before you even called Commit. The database doesn't work directly on the data in your app. That data is sent to the database first and it works on...
  16. J

    Question Navigation panel on main form button formatting

    You use an actual CheckBox control and set its Appearance property to Button. You can do the same with RadioButton controls too. Obviously you then need to use the CheckedChanged event to determine when to act.
  17. J

    I have edited your signature to remove what appears to be advertising. I have approved your...

    I have edited your signature to remove what appears to be advertising. I have approved your first post but it looks suspiciously like spam and simply a means to get that signature advertising seen. I will keep an eye on your posts for a while and, if I see that they in good faith, I will take no...
  18. J

    Question Imports multiple txt files into datagriview

    Please repost your code and format it correctly with line breaks. Also, please post ONLY the relevant code. It's rare that you would need to post the namespace imports so that suggests that you haven't actually trued to determine what code is relevant to the problem. Every bit of irrelevant code...
  19. J

    Question Imports multiple txt files into datagriview

    When I edited your first post, I stated that only posts in English are acceptable and that, while I had translated that post for you, any further non-English posts would be deleted. As such, your second post has been deleted. Please post only in English.
  20. J

    Question Imports multiple txt files into datagriview

    The grid is not really relevant. You can certainly display the data in a grid before saving but it is not really part of the process. If the user is to make any modifications to the data before saving, they can also do so via the grid. What you ought to do is to read the data into a DataTable...
Top Bottom