Solved

explicit conversion in VB.net

Posted on 2006-06-15
4
1,092 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
Comment Utility
To explicitly cast you simply add "(ErrorViewer.TXTRecordType)" to your TextRecord var...

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

Neil
0
 

Author Comment

by:NESupply
Comment Utility
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
Comment Utility
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
Comment Utility
U Can use Functions :

Ctype()
or
DirectCast()

0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now