Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / December 2004

Tip: Looking for answers? Try searching our database.

Ctype FUNCTION

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Angel - 17 Dec 2004 20:56 GMT
I would like to know if there is a way to convert a variable of a certain
type literaly instead of explicity knowing what type to convert it to. For
example i have the following code:

dim myObject as Object
Dim aObj as htmlcell

aObj = CTYPE(myObject, "HTMLCELL")

I know the Ctype function requires the type in its second parameter to be
known. It does not accept literal values. There are instances where i have a
bunch of controls and instead of creating multiple ctype functions for each
control pointing to its type, I would like just one ctype and then passing my
code a literal to indicate to convert it to. I hope you understand what I
want. I believe what I need is called reflection, but I am not sure...

Thanks ahead of time.
Mattias Sj?gren - 18 Dec 2004 00:20 GMT
You can't do that. And even if you could, what would you do with the
function's return value?

Mattias

Signature

Mattias Sjögren [MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.