Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

explicit conversion in VB.net

Posted on 2006-06-15
4
Medium Priority
?
1,158 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 375 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

722 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