Solved

explicit conversion in VB.net

Posted on 2006-06-15
4
1,109 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

912 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

22 Experts available now in Live!

Get 1:1 Help Now