SharpDevelop Community

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

about Mid() to substring

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

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

    about Mid() to substring

    // VB.NET code 

      Public ReadOnly Property DB_Provider() As String

        Get

          Try

            dbProvider = Mid(ConfigurationManager.AppSettings("DB_Provider").ToString, 1, 1)

          Catch error_occure As Exception

            dbProvider = "S"   ' MS SQL

          End Try

          Return dbProvider

        End Get

      End Property

    // C# from conversion
    public string DB_Provider 
    {
    get 
    {
    try 
    {
    dbProvider = Strings.Mid(ConfigurationManager.AppSettings("DB_Provider").ToString, 1, 1);
    catch (Exception error_occure) 
    {
    dbProvider = "S";   // MS SQL
    }
    return dbProvider;
    }
    }
    // Please be informed about Mid() to substring
    dbProvider = ConfigurationManager.AppSettings["DB_Provider"].Substring(0, 1);
    Thank you for your support
    Kittisak
    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.