SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

inform about AppSettings() from VB.NET

Last post 03-26-2017 9:39 AM by kittisak. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 03-26-2017 9:39 AM

    • kittisak
    • Not Ranked
    • Joined on 03-26-2017
    • Bangkok
    • Posts 2

    inform about AppSettings() from VB.NET

    // VB.NET

            Try

              connectUser = ConfigurationManager.AppSettings("DB_User_ID").ToString

            Catch error_occure As Exception

              connectUser = ""

            End Try

    // c# from conversion
    try {
    connectUser = ConfigurationManager.AppSettings("DB_User_ID").ToString;
    } catch (Exception error_occure) {
    connectUser = "";
    }
    // inform about AppSettings[" "] and no ToString
                    connectUser = ConfigurationManager.AppSettings["DB_User_ID"];
    Thank you
    Filed under:
Page 1 of 1 (1 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.