0

I hadd the visualBasic to my visual but this error keep showing. The game works until this function has to work, then it close. Here you have the function and the line that is wrong. I dont know how to fix it

   private string PedirAlias(){
        **String alias = Microsoft.VisualBasic.Interaction.InputBox("Introduce tu alias: " , "Nuevo record" , "None" , 100 , 100 );**
        string alias_aux = "";
        for (int i = 0; i < alias.Length && i<8; i++)
        {
            alias_aux += alias[i];
        }
        if(alias.Length<8){
            for (int i =  alias.Length; i <8; i++)
        {
                alias_aux += "";
        }    

        }
        return alias_aux;

    }
  • Please share the actual error you're getting. CS0234 says a type or namespace is not found, so there's a chance that you haven't referenced the DLL where `Microsoft.VisualBasic.Interaction.InputBox` is found. – StriplingWarrior May 06 '20 at 20:08
  • Does this answer your question? [How to add reference to Microsoft.VisualBasic.dll?](https://stackoverflow.com/questions/21212194/how-to-add-reference-to-microsoft-visualbasic-dll) – devNull May 06 '20 at 20:09

0 Answers0