Translating A C# WCF App Into VB

Oct 15, 2010

I'm trying to write a simple/small Windows Communication Foundation service application in Visual Basic (but I am very novice in VB) and all the good examples I've found on the net are written in C#. So far I've gotten my WCF service application working but now I'm trying to add callback functionality and the program has gotten more complicated. In the C# example code I understand how everything works but I am having trouble translating into VB the portion of code that uses a delegate. Can someone please show the VB equivalent?

Here is the C# code sample I'm using for reference:

[code...]

Is that casting the callback object as type ICommunicationObject? How is that done in VB?

View 3 Replies


ADVERTISEMENT

Translating C# To VB?

Feb 18, 2010

I have to admit, I can't always translate C# code to VB. Case in point:the MSDN library has the definition and example of an FTPWebRequest in C#, but not in VB. I think I can understand most of it, but can someone translate the small snippet below for me? Don't worry about the variable definitions, I've got that, but I can't tell of the subsequent methods are functions or sub routines.And what are those "get" and "set" calls?[code]......

View 6 Replies

C# To VB Not Translating Well With CUINT?

Sep 2, 2010

Having trouble converting a bit of C# code to VB.NET.I got his code from CodeProject:

[Code]...

View 1 Replies

Translating 'New' Arrays To C#

Dec 9, 2011

I'm trying to translate some code from VB.Net to C#, but I've run into an issue.The Vb.Net line of code I want to translate is:[code]However, this is giving me a nasty 'Object reference is not set to an instance of an object' error.

View 3 Replies

Translating A Function From PHP To .NET?

Mar 25, 2011

I am more of a PHP Coder then VB.net Programmer so I made this and converting this function.

<?php
function grabshade($r,$g,$b){
$colors = array(array(0, 0, 0), array(255, 255, 255));
$differencearray = array();

[code]....

View 3 Replies

Translating Function From C#?

Jul 31, 2011

I'm not the best at reading and translating C#.

public IEnumerable ActiveEntities
{
get { return GetActiveEntities(Query); }

[Code].....

View 4 Replies

Translating Hex To Numerical?

Jan 16, 2011

what I am trying to do it read a form of hex that is encoded I know the cypher what I want to do is make a program for myself that will let me compare 2 files. Both in hex decypher the hex to numerical.I call the hex backwards hex what I mean is this..in stead of "04 58 d2 d2" it is "d2 d2 58 04" I know the number it translates to is 72930002I want to show the entire list in a list box where I can choose wich I want to look at.

View 8 Replies

Asp.net Mvc 3 - Translating The Razor Syntax?

Jan 25, 2011

MVC 3 is great but in some cases I am having trouble translating the Razor syntax. Anyone know of a good VB.Net Razor reference?

View 1 Replies

Translating A Piece Of C# Code

Aug 6, 2009

I am translating a piece of C# code into VB.NET using online convertors..[code]The VB.NET translation is not up to the mark and gives compiler errors Any VB.NET expert who can suggest what to change to make the code compile?url.

View 10 Replies

Translating A Small C# WCF App Into VB (part 2)?

Oct 18, 2010

I recently asked a question about translating a code sample I found on on the internet from C# into VB and I was given links to websites that automate code translation [URL].. I am very new to VB and unfortunately the VB that the translators returned doesn't compile in Visual Studio 2010. I am hoping someone can help me fix the non-working portion of VB code.

Here is the C# code I am converting into VB:

[Code]...

View 2 Replies

Translating Delegate Usage From C# To VB

Apr 1, 2010

In physics library written in C# I have the following code:

[Code]...

I'd like to do the same in VB. (just thandling the delegate, not the declaration) I tried this, but it doesn't work: AddHandler ContactManager.PostSolve, AddressOf PostSolve The following works, but only allows me to have one handler for the delegate: ContactManager.PostSolve = new PostSolveDelegate(AddressOf PostSolve) Is there a way for me to do the same thing in VB that was done in the first piece of code?

View 2 Replies

Translating VB To C# - Type Conversion?

May 9, 2011

with translating some code from VB to C#.

Public Function ToBase36(ByVal IBase36 As Double) As String
Dim Base36() As String = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U",

[code].....

View 3 Replies

VS 2008 Translating A C# Snipet Into VB?

Aug 18, 2011

I am writing a program in visual studio to exchange data with a webservice. The webservice, Kareo.com, gives an example of a program but it is in C# - I am trying to replicate their program in visual basic, which is the language that I am more comfortable with. I got most of it to work but am running into problems with two lines "patientCase.Policies = new InsurancePolicyCreateReq[] { primaryPolicy, secondaryPolicy };" and "newPatient.Cases = new PatientCaseCreateReq[] { patientCase };"the C# version of the entire program is below.

[Code]...

View 2 Replies

VS 2010 Translating Code From C# To .net?

Apr 16, 2012

Just a quick question, what will this code be in vb.net? if this is the wrong place for this request.

[Code]...

View 1 Replies

C# - Errors Translating Regex From .NET To Javascript?

May 19, 2011

I have this piece of VBNet code that i would like to translate into javascript:

Dim phone_check_pattern = "^(+?|((+?[0-9]{1,3}))|)([ 0-9.//-]|([ 0-9.//-]+))+((x|X|((e|E)(x|X)(t|T)))([ 0-9.//-]|([ 0-9.//-]+)))?$"
System.Diagnostics.Debug.WriteLine(System.Text.RegularExpressions.Regex.IsMatch("test input", phone_check_pattern))

my translated result:

var phone_check_pattern = "^(+?|((+?[0-9]{1,3}))|)([ 0-9.//-]|([ 0-9.//-]+))+((x|X|((e|E)(x|X)(t|T)))([ 0-9.//-]|([ 0-9.//-]+)))?$";
alert(new RegExp(phone_check_pattern).test("test input"))

However when i run it it has error Uncaught SyntaxError: Invalid regular expression:: Nothing to repeat

(my VbNet code doesn't have any error though)

View 3 Replies

Make Some Special Translating Program?

Jun 9, 2011

i'm starting to learn vb.net, and i trying to make some special translating program, its need to translate hebrew text into special letter sequence. the text input are: ב יית בי יי ים מתקדמים (which its means Construction of advanced buildings ) And the text output are: BPJJZ_BJPJJPJM_NZWDNJM according to the list i made (Attached picture).

[Code]...

View 17 Replies

Translating Letters To Numerical Values

Nov 4, 2010

I want my code to look at a textbox to determine which letter is in it, & assign a numerical value to a second textbox, based on what letter is in the first textbox.[code]The problem is that, when I step through the code, I can see that Form20.txtGrade1.text DOES EQUAL "C", but my code skips over the part that says Form20.txtGrade1a.text = "4". Instead, if I hover over that part, I can read Form20.txtGrade1a.text = " ".When I do not step through the code, and just run it, I see the two textboxes, with the first one containing the C, and the second one is just blank.

View 4 Replies

Translating Text From Some Language To English

Feb 25, 2009

In my current project, i need to build a tool to translate text from some languages to English
Ex.: Chinese To English
Is there any translation SDK available?

View 3 Replies

Small Errors When Translating Code From C# To Program

Feb 19, 2012

I have almost completed a translation from C# to VB.NET, however, I run into some small errors[code]...

View 1 Replies

VS 2010 Translating Form Data (fetched From Mysql) To Excel Doc?

Oct 17, 2011

translating form data (fetched from mysql) to excel doc how can i do it? i saw a couple of examples but none worked only in vb6?

View 3 Replies

Translating Decompiled Code - Function That Accepts An Item Name Its Cost And Its Quantity

May 6, 2011

I was wondering if someone could translate this code into a more understandable code. It is suppose to be a function that accepts an item name its cost and its quantity. and adds one more array element to ."items" variable and assigns the given name and cost and quantity.

Public Sub AddItem(ByVal strName As String, ByVal dblCost As Double, ByVal intQuantity As Integer)
Me.items=DirectCast(Utils.CopyArray(DirectCast(Me.items,Array),New Purchase(me.itemsCount + 1)-1){}),Purchase())

End Sub

This is the translation i made but i don't think it is correct.

Public Sub AddItem(ByVal strName As String, ByVal dblPrice As Double, ByVal intQuan As Integer)
Dim items As Purchase() = Me.items
Dim itemCount As Integer = Me.itemsCount
For itemCount = 0 To items.Length - 1

[CODE]...

View 3 Replies

.net - Translating C Code Using OpenSSL For Public-key Authentication To VisualBasic.NET Using System.security.cryptography?

Oct 20, 2009

I am trying to mimic the results of some C code that uses the OpenSSL library using the system.security.crytography library in the .net 3.5 world, and I can't seem to get it right. part of the issue is my understanding of crytography in general.

Here's what is supposed to happen:

I send a request for authentication to a device.It returns a challenge digest, which I then need to sign with a known key and return The device returns a "success" or "Fail" message.I have the following code snippet that I am trying to "copy":

[Code]...

View 4 Replies

Translating Vbscript String To C# String

Oct 28, 2009

Ok I have a vbscript string in a wsf file as below:

[Code]...

What I need to do is convert this string to a c# string, I understand that a vbscript & translates to a + in c# string concatentation but what does vbCrLf and _ translate to?

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved