I never want to split connection string using string manipulation and get server,database,uid and password.
I read the following link and read the accepted answer ,
You can use InitialCatalog Property or builder["Database"] works as well. I tested it with different case and it still works.
builder["Database"]