473,385 Members | 1,610 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Implicit conversion useable in other languages

Hello,

I recently created a structure in C# that offers several implicit
conversion, hoping I could then reference the C# project from a VB.Net
project, and use this object in VB.Net. It does not seem to work.

I know you cannot create implict conversion in VB.Net, but is the feature
also only useable from C#?

Thanks.

Kel
Nov 15 '05 #1
1 1249
Kel,
I know you cannot create implict conversion in VB.NET, but is the feature
also only useable from C#? The current version of VB.NET does not support Operator Overloading, which
means creating or using them. Using them as operators that is.

However! You can use the underlying functions created as part of the
Operator Overloading. Which means from VB.NET you can use the op_Implicit &
op_Explicit methods of your C# class to get at the overloaded operator
methods.

You may need to use 'Tools - Options - Text Editor - Basic - General' to
change the "Hide advanced members" to see the op_Implicit & op_Explicit
function.

Note: when creating overloaded operators a static function starting with op_
is created, VB.NET can use the op_ functions created.

BTW: VB.NET 2004 (Whidbey) is suppose to support Operator Overloading!

http://msdn.microsoft.com/vstudio/pr...o/roadmap.aspx

Hope this helps
Jay

"Kel Good" <ke*@christian-pub.com> wrote in message
news:O4**************@TK2MSFTNGP09.phx.gbl... Hello,

I recently created a structure in C# that offers several implicit
conversion, hoping I could then reference the C# project from a VB.Net
project, and use this object in VB.Net. It does not seem to work.

I know you cannot create implict conversion in VB.Net, but is the feature
also only useable from C#?

Thanks.

Kel

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Russell Reagan | last post by:
In a newer version of a chess program I am writing, I have created classes that are (more or less) drop in replacements for things that used to be plain old integer or enumerated variables (colors,...
11
by: Steve Gough | last post by:
Could anyone please help me to understand what is happening here? The commented line produces an error, which is what I expected given that there is no conversion defined from type double to type...
9
by: Girish | last post by:
Im trying to understand implicit type conversions from object -> string and vice versa. I have two classes, one Driver and one called StringWrapper. These are just test classes that try and...
11
by: Aaron Queenan | last post by:
Given the classes: class Class { public static implicit operator int(Class c) { return 0; } } class Holder
36
by: Chad Z. Hower aka Kudzu | last post by:
I have an implicit conversion set up in an assembly from a Stream to something else. In C#, it works. In VB it does not. Does VB support implicit conversions? And if so any idea why it would work...
20
by: srinivasarao_moturu | last post by:
template<class TClass ABC { public : void SetValue(T k) { val = k; } private: T val; };
82
by: robert bristow-johnson | last post by:
here is a post i put out (using Google Groups) that got dropped by google: i am using gcc as so: $ gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure...
3
by: utab | last post by:
Dear all, I was trying to write a more complex program, and while searching for sth in my reference C++ primer, by Lippman. I had a question in the mind, see the code below #include <string>...
8
by: jonpb | last post by:
Hi, Is it possible to define a implicit operator from base to derived types in C#? I have a Point class and would like to derive a Vector class from it and add a couple new vector related...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.