C# App Saving and Reloading with .NET ConfigurationManager (XML config files)

Поділитися
Вставка
  • Опубліковано 27 кві 2023
  • How can you save your application and start it up later in exactly the same state as when you last used it? With its window in the same position, having the same size and with the last used document automatically reloaded? The simple solution is to use the .NET ConfigurationManager.
    The ConfigurationManager gives you an easy way to write application settings into an XML file. If you had to write all the XML entries yourself, this process might be quite difficult and error-prone. The ConfigurationManager simplifies this. I show how to use the ConfigurationManager in C# in this lesson.
    For more C# Programming Projects, see this Playlist: • C# Programming Projects
    Huw Collingbourne is author of numerous books on programming C, C#, Java, Ruby, Delphi and Object Pascal, pointers, recursion and programming adventure games. Find them all on Amazon.
    To learn C# quickly, Huw’s book, available in paperback or for Kindle, is the perfect complement to these UA-cam lessons.
    The Little Book Of C# Programming (Amazon US): amzn.to/2JWDI0o
    The Little Book Of C# Programming (Amazon UK): amzn.to/2YaCPtS
    Keep in Touch
    ==============================
    Subscribe to the Code With Huw UA-cam channel: ua-cam.com/users/CodeWithHuw?s...
    Code With Huw on Facebook:
    / codewithhuw

КОМЕНТАРІ • 6

  • @Mabh838
    @Mabh838 4 місяці тому +1

    Thank you for explaining in short ,simple way

  • @rayt6867
    @rayt6867 Рік тому +2

    Hello Huw, Thanks to you, I have created 4 shortcuts, one for Office, Utilities, System and Printer apps, but I just thought about creating on launcher app with tabs to have just one app instead of 4. Also to minimize to the system tray. Wow! it getting to be a nice all around app. Thank you very much. You have very nice dogs!

    • @LearnWithHuw
      @LearnWithHuw  Рік тому +1

      I'm glad you found it useful. Yes, there are lots of ways in which this simple application can be expanded to make it more useful. It sounds like you are making good progress! (Thanks for the comment about my dogs. I love them dearly. And they drag me away from the keyboard regularly to take them for walks - which helps to keep me sane!)

  • @09harikesh
    @09harikesh 6 місяців тому

    How to update node attributes present in custom config section from c#.

  • @shaihulud4515
    @shaihulud4515 7 місяців тому

    Is this the same approach when using wpf and mvvm?