I'm trying to translate a C# class to VB (Dot Net 2.0). I am not all that
familiar with C#. This C# class implements the IDataReader interface.
In C#, when a class implements an interface that specifies a readonly
property, does C# care whether that readonly property is implemented as a
readonly property or as a method, so long as it has the correct name and
return type? 6 1120
B. Chernick <BC*******@discussions.microsoft.comwrote:
I'm trying to translate a C# class to VB (Dot Net 2.0). I am not all that
familiar with C#. This C# class implements the IDataReader interface.
In C#, when a class implements an interface that specifies a readonly
property, does C# care whether that readonly property is implemented as a
readonly property or as a method, so long as it has the correct name and
return type?
Yes, it has to be a property.
--
Jon Skeet - <sk***@pobox.com>
Web site: http://www.pobox.com/~skeet
Blog: http://www.msmvps.com/jon.skeet
C# in Depth: http://csharpindepth.com
Hello B. Chernick,
I'm trying to translate a C# class to VB (Dot Net 2.0). I am not all
that familiar with C#. This C# class implements the IDataReader
interface.
In C#, when a class implements an interface that specifies a readonly
property, does C# care whether that readonly property is implemented
as a readonly property or as a method, so long as it has the correct
name and return type?
Try this. Very easy and helps 90% in most cases. http://labs.developerfusion.co.uk/co...arp-to-vb.aspx
Regards,
Sachin
There is also a very good pay tool for people who have a lot of conversions
called VB Conversions. It is up to date and fairly good at conversions.
--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
Subscribe to my blog http://feeds.feedburner.com/GregoryBeamer#
or just read it: http://feeds.feedburner.com/GregoryBeamer
********************************************
| Think outside the box! |
********************************************
"Sachin Pise" <sa*********@nexsoft.aewrote in message
news:70*************************@msnews.microsoft. com...
Hello B. Chernick,
>I'm trying to translate a C# class to VB (Dot Net 2.0). I am not all that familiar with C#. This C# class implements the IDataReader interface.
In C#, when a class implements an interface that specifies a readonly property, does C# care whether that readonly property is implemented as a readonly property or as a method, so long as it has the correct name and return type?
Try this. Very easy and helps 90% in most cases. http://labs.developerfusion.co.uk/co...arp-to-vb.aspx
Regards,
Sachin
Yes, that's one of the tools I've been using, although I think SharpDevelop
is more useful for converting whole projects.
"Sachin Pise" wrote:
Hello B. Chernick,
I'm trying to translate a C# class to VB (Dot Net 2.0). I am not all
that familiar with C#. This C# class implements the IDataReader
interface.
In C#, when a class implements an interface that specifies a readonly
property, does C# care whether that readonly property is implemented
as a readonly property or as a method, so long as it has the correct
name and return type?
Try this. Very easy and helps 90% in most cases. http://labs.developerfusion.co.uk/co...arp-to-vb.aspx
Regards,
Sachin
It's possible my confusion may be due to a glitch in the translator or Visual
Studio.
If I remember correctly, when I translated this class, the output contained
(more or less) a batch of correctly named functions to match the interface
and also a batch of readonly properties with matching names but with an added
'1' at the end. And these properties had the Implements
System.Data.IDataReader.<method namestatement.
Had to fix it manually.
"Jon Skeet [C# MVP]" wrote:
B. Chernick <BC*******@discussions.microsoft.comwrote:
I'm trying to translate a C# class to VB (Dot Net 2.0). I am not all that
familiar with C#. This C# class implements the IDataReader interface.
In C#, when a class implements an interface that specifies a readonly
property, does C# care whether that readonly property is implemented as a
readonly property or as a method, so long as it has the correct name and
return type?
Yes, it has to be a property.
--
Jon Skeet - <sk***@pobox.com>
Web site: http://www.pobox.com/~skeet
Blog: http://www.msmvps.com/jon.skeet
C# in Depth: http://csharpindepth.com
Are you talking about your 'http://www.vbconversions.net/'? If so, I'm
afraid my immediate orders are to translate a C# program to VB, not vice
versa. (Please don't ask why...)
"Cowboy (Gregory A. Beamer)" wrote:
There is also a very good pay tool for people who have a lot of conversions
called VB Conversions. It is up to date and fairly good at conversions.
--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
Subscribe to my blog http://feeds.feedburner.com/GregoryBeamer#
or just read it: http://feeds.feedburner.com/GregoryBeamer
********************************************
| Think outside the box! |
********************************************
"Sachin Pise" <sa*********@nexsoft.aewrote in message
news:70*************************@msnews.microsoft. com...
Hello B. Chernick,
I'm trying to translate a C# class to VB (Dot Net 2.0). I am not all
that familiar with C#. This C# class implements the IDataReader
interface.
In C#, when a class implements an interface that specifies a readonly
property, does C# care whether that readonly property is implemented
as a readonly property or as a method, so long as it has the correct
name and return type?
Try this. Very easy and helps 90% in most cases. http://labs.developerfusion.co.uk/co...arp-to-vb.aspx
Regards,
Sachin This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: mike420 |
last post by:
I think everyone who used Python will agree that its syntax is
the best thing going for it. It is very readable and easy
for everyone to learn. But, Python does not a have very good
macro...
|
by: Aaron Walker |
last post by:
Greetings,
I'm attempting to write my first *real* template function that also deals with
a map of strings to member function pointers that is making the syntax a little
tricky to get right.
...
|
by: bor_kev |
last post by:
Hi,
First of all, i want to use the new managed class syntax and STL.NET
under Microsoft Visual (C++) Studio 2005 Beta.
I read in a Microsoft...
|
by: r.nikhilk |
last post by:
Hi,
Currently, we are porting C++ applications from 32 bit to 64 bit on AIX
platform. (The current version of AIX is 5.3 and xlC verison is 8.0).
We are able to compile the applications by...
|
by: astromog |
last post by:
I have some significantly extended syntax for Python that I need to
create a reference implementation for. My new syntax includes new
keywords, statements and objects that are sort of like classes...
|
by: deppy_3 |
last post by:
Hi!
The syntax of fputs() is similar with the syntax of fgets();
For example
if we have:fgets(str,maxlen,stdin)
which is the syntax of the fputs();
|
by: Smithers |
last post by:
Are there any important differences between the following two ways to
convert to a type?... where 'important differences' means something more
profound than a simple syntax preference of the...
|
by: berrylthird |
last post by:
This question was inspired by scripting languages such as JavaScript. In JavaScript, I can access members of a class using array syntax as in the following example:
var myInstance:myClass = new...
|
by: trose178 |
last post by:
Good day all, I am working on a multi-select list box for a standard
question checklist database and I am running into a syntax error in
the code that I cannot seem to correct. I will also note...
|
by: Daniel |
last post by:
I hope this question is OK for this list. I've downloaded Rpyc and
placed it in my site packages dir. On some machines it works fine, on
others not so much.
Here is one error I get when I try...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |