Solved

explicit conversion in VB.net

Posted on 2006-06-15
4
1,120 Views
Last Modified: 2012-08-13
Trying to clean up a warning

warning BC41999: Implicit conversion from 'System.ValueType' to 'ErrorViewer.TXTRecordType'
The warning is on the TextRecord Var

FileGet(nFileHandle, TextRecord, 1)

How come i Explicitly cast TextRecord as a System.ValueType
0
Comment
Question by:NESupply
  • 2
4 Comments
 
LVL 6

Expert Comment

by:neilprice
ID: 16914367
To explicitly cast you simply add "(ErrorViewer.TXTRecordType)" to your TextRecord var...

FileGet(nFileHandle, (ErrorViewer.TXTRecordType)TextRecord, 1)

Neil
0
 

Author Comment

by:NESupply
ID: 16914451
Yeah I tried that early. I get this error.

Error  - >  'TXTRecordType' is a type in 'ErrorViewer' and cannot be used as an expression.

Thanks
   Tim
0
 
LVL 6

Accepted Solution

by:
neilprice earned 125 total points
ID: 16915748
I'm sorry!

I thought I was in the C# forum.

Try using CType();

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vafctctype.asp

Hope this helps,
Neil
0
 
LVL 6

Expert Comment

by:manch
ID: 16918196
U Can use Functions :

Ctype()
or
DirectCast()

0

Featured Post

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question