They are just showing an example using VB.NET code, you don't need to write any code you just need to set the conection string in user.config and make sure you have installed the MySql Data layer dlls and setup files for mojoPortal
<add key="MySqlConnectionString" value="Server=db.ditdomæne.dk;Database=webXXXX;Uid=webXXXX;Pwd=XXXX;Charset=utf8;" />