473,654 Members | 3,066 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C# to VB conversion help please

I have the following code

Namespace BlahBlah.Blah
{
Public Interface ICustomInt
{
string Prop1
{
set;
}

string Prop2;
{
get;
}
}
}

What would be the VB equivelant of this? How do I get the Get and Set
statements in VB inside of an Interface statement?

Namespace BlahBlah.Blah
Public Interface ICustomInt
Public Property Prop1 as string
Public Property Prop2 as string
End Interface
End Namespace
Nov 18 '05 #1
3 1001
TJS
http://authors.aspalliance.com/aldot...translate.aspx
"Nathon Dalton" <DO NOT REPLY> wrote in message
news:OJ******** ******@TK2MSFTN GP11.phx.gbl...
I have the following code

Namespace BlahBlah.Blah
{
Public Interface ICustomInt
{
string Prop1
{
set;
}

string Prop2;
{
get;
}
}
}

What would be the VB equivelant of this? How do I get the Get and Set
statements in VB inside of an Interface statement?

Namespace BlahBlah.Blah
Public Interface ICustomInt
Public Property Prop1 as string
Public Property Prop2 as string
End Interface
End Namespace

Nov 18 '05 #2
I use that site a lot.
It is great.
But not perfect.

If you have any #Region codes comment them out first and then translate.
The AndAlso, OrElse constructs don't get translated right.
When an Interface is involved none of the Implements statements get
generated. You have to add them by hand.

So, other than a few minor details, the site does a great job of translating
C# into a readable language. <g>
--
Joe Fallon


"TJS" <no****@here.co m> wrote in message
news:Ob******** ******@tk2msftn gp13.phx.gbl...
http://authors.aspalliance.com/aldot...translate.aspx
"Nathon Dalton" <DO NOT REPLY> wrote in message
news:OJ******** ******@TK2MSFTN GP11.phx.gbl...
I have the following code

Namespace BlahBlah.Blah
{
Public Interface ICustomInt
{
string Prop1
{
set;
}

string Prop2;
{
get;
}
}
}

What would be the VB equivelant of this? How do I get the Get and Set
statements in VB inside of an Interface statement?

Namespace BlahBlah.Blah
Public Interface ICustomInt
Public Property Prop1 as string
Public Property Prop2 as string
End Interface
End Namespace


Nov 18 '05 #3
TJS
I agree, it is not perfect, but so far it is the best solution I have found,
I haven't had any better results at any other site .

"Joe Fallon" <jf******@nospa mtwcny.rr.com> wrote in message
news:OV******** ********@TK2MSF TNGP12.phx.gbl. ..
I use that site a lot.
It is great.
But not perfect.

If you have any #Region codes comment them out first and then translate.
The AndAlso, OrElse constructs don't get translated right.
When an Interface is involved none of the Implements statements get
generated. You have to add them by hand.

So, other than a few minor details, the site does a great job of translating C# into a readable language. <g>
--
Joe Fallon


"TJS" <no****@here.co m> wrote in message
news:Ob******** ******@tk2msftn gp13.phx.gbl...
http://authors.aspalliance.com/aldot...translate.aspx
"Nathon Dalton" <DO NOT REPLY> wrote in message
news:OJ******** ******@TK2MSFTN GP11.phx.gbl...
I have the following code

Namespace BlahBlah.Blah
{
Public Interface ICustomInt
{
string Prop1
{
set;
}

string Prop2;
{
get;
}
}
}

What would be the VB equivelant of this? How do I get the Get and Set
statements in VB inside of an Interface statement?

Namespace BlahBlah.Blah
Public Interface ICustomInt
Public Property Prop1 as string
Public Property Prop2 as string
End Interface
End Namespace



Nov 18 '05 #4

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

Similar topics

8
1995
by: weasel | last post by:
Why is the Farenheit to Celsius part not working properly? Instead of showing a similar range of what the farenheit is listing, the celsius portion is showing half the range of farenheit. print "\nWelcome to the Temperature program" while True: low1 = raw_input("Please enter a low temperature: ").upper() if low1 != 'I QUIT': low = int(low1)
30
5039
by: Tim Johansson | last post by:
I'm new to C++, and tried to start making a script that will shuffle an array. Can someone please tell me what's wrong? #include <iostream.h> #include <string.h> int main () { srand(time(0)); int array_length; int count;
31
6618
by: Bjørn Augestad | last post by:
Below is a program which converts a double to an integer in two different ways, giving me two different values for the int. The basic expression is 1.0 / (1.0 * 365.0) which should be 365, but one variable becomes 364 and the other one becomes 365. Does anyone have any insight to what the problem is? Thanks in advance. Bjørn
4
6482
by: Nikhil Patel | last post by:
Hi all, I am a VB6 programmer and learning C#. I am currently reading a chapter on types. I have question regarding enums. Why do we need to convert enum members to the value that they represent? Thanks in advance... -Nikhil
11
7606
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 Test. I expected the same error from the following line, but it compiles fine. The double is silently truncated to an int and then fed in to the implicit conversion operator. Why does this happen? Is there any way that I can keep the implicit...
8
4339
by: Duncan Winn | last post by:
I am new to VC++7. I am using a method GetPrivateProfileString that requires an LPTSTR. I have defined this as a: char * data_name; I am then trying to convert this to an LPOLESTR and I have done this as follows: LPOLESTR dunk_data = (LPOLESTR)T2CW(data_name);
11
2696
by: jyck91 | last post by:
// Base Conversion // Aim: This program is to convert an inputted number // from base M into base N. Display the converted // number in base N. #include <stdio.h> #include <stdlib.h> #include <string.h> #define LENGTH 20 int temp, m, n, i, r, base10, true;
3
4610
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> #include <iostream> #include <cstring> int main(){
1
4287
by: v4vijayakumar | last post by:
Can "c++ conversion operator" be considered as an example for Prototype design pattern? Following example explains, C++ conversion operator. #include <iostream> #include <string> using namespace std; class test
6
2629
by: Rahul | last post by:
Hi Everyone, I have the following code, class B; class A { public : operator B();
0
8380
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8296
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8497
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7310
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5627
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4299
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2721
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1928
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.