By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,660 Members | 1,037 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,660 IT Pros & Developers. It's quick & easy.

Compilation Error "The name Convert is not declared"

P: n/a
Hello

I'm getting an error during a .vb file compilation.

My command is :

vbc /t:library /r:system.web.dll /r:system.dll /r:mscorlib.dll myFile.vb
The error is :
Compilateur Microsoft (R) Visual Basic .NET version 7.10.6310.4
pour Microsoft (R) .NET Framework version 1.1.4322.2300
Copyright (C) Microsoft Corporation 1987-2002. Tous droits réservés.

F:\orespub\Encryption.vb(33) : error BC30451: Le nom 'Convert' n'est pas
déclaré.
Return Convert.ToBase64String(ms.GetBuffer(), 0, ms.Length)
~~~~~~~
F:\orespub\Encryption.vb(44) : error BC30451: Le nom 'Convert'
n'est pas
déclaré.

Dim buffer As Byte() = Convert.FromBase64String(value)
--> The name Convert is not declared.

The reference to mscorlib.dll assembly is realised. I don't understand the
error for the name Convert.
Which assembly do i used ?
Thanks for your help.

Fabrice
Nov 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Fabrice,

Just use System.Convert.To...

Eliyahu

"fabrice" <em******@test.com> wrote in message
news:uO**************@TK2MSFTNGP14.phx.gbl...
Hello

I'm getting an error during a .vb file compilation.

My command is :

vbc /t:library /r:system.web.dll /r:system.dll /r:mscorlib.dll myFile.vb
The error is :
Compilateur Microsoft (R) Visual Basic .NET version 7.10.6310.4
pour Microsoft (R) .NET Framework version 1.1.4322.2300
Copyright (C) Microsoft Corporation 1987-2002. Tous droits réservés.

F:\orespub\Encryption.vb(33) : error BC30451: Le nom 'Convert' n'est pas
déclaré.
Return Convert.ToBase64String(ms.GetBuffer(), 0, ms.Length)
~~~~~~~
F:\orespub\Encryption.vb(44) : error BC30451: Le nom 'Convert'
n'est pas
déclaré.

Dim buffer As Byte() = Convert.FromBase64String(value)
--> The name Convert is not declared.

The reference to mscorlib.dll assembly is realised. I don't understand the
error for the name Convert.
Which assembly do i used ?
Thanks for your help.

Fabrice

Nov 19 '05 #2

P: n/a
fabrice <em******@test.com> ha scritto:
Compilateur Microsoft (R) Visual Basic .NET version 7.10.6310.4
pour Microsoft (R) .NET Framework version 1.1.4322.2300
Copyright (C) Microsoft Corporation 1987-2002. Tous droits réservés.

F:\orespub\Encryption.vb(33) : error BC30451: Le nom 'Convert' n'est
pas déclaré.
Return Convert.ToBase64String(ms.GetBuffer(), 0,
ms.Length) ~~~~~~~
F:\orespub\Encryption.vb(44) : error BC30451: Le nom 'Convert'
n'est pas
déclaré.

Dim buffer As Byte() = Convert.FromBase64String(value)
--> The name Convert is not declared.

The reference to mscorlib.dll assembly is realised. I don't
understand the error for the name Convert.
Which assembly do i used ?
In your code, you have inserted the import for the namespace System?

imports System
imports System.Data
.... Thanks for your help.

Fabrice


--
AZ [Microsoft - .NET MVP]
Mia Home page: http://ciclismo.sitiasp.it
Asp.Net community: http://www.aspitalia.com
Il mio blog: http://blogs.aspitalia.com/az
Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Browse more ASP.NET Questions on Bytes