Home
Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
C# Community
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Home
Forums
Visual Studio .NET
.NET Framework
Conversion Problem
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Angelan" data-source="post: 5053" data-attributes="member: 2019"><p>I wanted to convert a String to Byte.. is that possible?</p><p>what I did was i got a </p><p>Public Sub(ByVal email As String)</p><p>then i convert the email by the following method:</p><p><span style="font-size: 10px"><span style="color: #0000ff"></span></span></p><p><span style="font-size: 10px"><span style="color: #0000ff">Dim</span></span><span style="font-size: 10px"> asd </span><span style="font-size: 10px"><span style="color: #0000ff">As</span></span><span style="font-size: 10px"><span style="color: #0000ff">Byte</span></span><span style="font-size: 10px"> = </span><span style="font-size: 10px"><span style="color: #0000ff">CByte</span></span><span style="font-size: 10px">(email)</span></p><p></p><p><span style="font-size: 10px">anyone knows if this method works?</span></p><p><span style="font-size: 10px">because i got an error showing:</span></p><p></p><p><span style="font-size: 10px">An unhandled exception of type 'System.InvalidCastException' occurred in microsoft.visualbasic.dll</span></p><p><span style="font-size: 10px">Additional information: Cast from string "<a href="mailto:asd@asd.net">asd@asd.net</a>" to type 'Byte' is not valid.</span></p><p></p><p><span style="font-size: 10px">and the value of asd i found is 0..</span></p><p><span style="font-size: 10px">why is this so? <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite5" alt=":confused:" title="Confused :confused:" loading="lazy" data-shortname=":confused:" /> </span></p><p><span style="font-size: 10px">Can someone please help mi? Thks in advance..</span></p><p><span style="font-size: 10px"></span></p><p><span style="font-size: 10px"></span></p></blockquote><p></p>
[QUOTE="Angelan, post: 5053, member: 2019"] I wanted to convert a String to Byte.. is that possible? what I did was i got a Public Sub(ByVal email As String) then i convert the email by the following method: [size=2][color=#0000ff] Dim[/color][/size][size=2] asd [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]Byte[/color][/size][size=2] = [/size][size=2][color=#0000ff]CByte[/color][/size][size=2](email)[/size] [size=2]anyone knows if this method works?[/size] [size=2]because i got an error showing:[/size] [size=2]An unhandled exception of type 'System.InvalidCastException' occurred in microsoft.visualbasic.dll[/size] [size=2]Additional information: Cast from string "[email="asd@asd.net"]asd@asd.net[/email]" to type 'Byte' is not valid.[/size] [size=2]and the value of asd i found is 0..[/size] [size=2]why is this so? :confused: [/size] [size=2]Can someone please help mi? Thks in advance..[/size] [size=2] [/size] [/QUOTE]
Insert quotes…
Verification
Post reply
Home
Forums
Visual Studio .NET
.NET Framework
Conversion Problem
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top
Bottom