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


ADVERTISEMENT

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

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

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

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 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

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 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

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

VS 2010 Convert VB6 Code To VB2010 Code From "The Most Amazing VB6 Code Ever" Thread?

Jul 19, 2011

This code was posted in Chit Chat and everyone is saying how great it is. I just have Visual Studio 2010 and no familiarity with VB6 so I thought it would be good to convert the code to Visual Basic 2010.

[Code]...

View 39 Replies

VS 2010 Bar-code Font With A Library That Converts Text To Proper Format For Bar-code Readers

Jan 18, 2012

I had a weird series of errors involving e.Graphics.DrawString() when painting a panel.I am using a barcode font [Code 128] with a library that converts text to the proper format for Barcode readers.That's fine, however, when I draw it to the panel, that's where things stop being fine:But, here's where things get funky. When I put it into a TextBox instead of drawing it via Graphics.DrawString(), everything is peachy:In fact, the TextBox one looks much better than the Graphics.DrawString() one! Am I doing something wrong?[code]

View 2 Replies

VS 2010 Code Commonality - All Files Share Common Code ?

Jan 22, 2012

Wondering if it is possible. It works on the idea that all files share common code. The program would ideally analyse the source file and compare it to the reference files. It would then find common parts of the code and write it to a rebuild file. At the end the rebuild file and the reference files would then be able to rebuild the source file without it being present.

For Example.

source file code = xxyyzyzyxw
ref file 1 = xyxxzyzxwyy
ref file 2 = zxxwyzzywxx

The program would then analyse these files and make a rebuild file like the following

source(0,1) = ref1(2,3)
source(2,3) = ref1(10,11)
source(4,7) = ref2(5,6) + ref2(5,6)
source(8,9) = ref2(2,3)

Thus you would be able to build the source file using these instructions and the reference files.

View 1 Replies

VB 2010 - Code Editor Not Deleting Code

Dec 6, 2011

when i put, for example, a picturebox in form and code some events. then i want delete that picturebox. well the code stills there. imagine that i use another picturebox i use the same name. now if i double click on these picturebox, the code editor recreates a new subs. can i disable these situation?

View 6 Replies

VS 2010 - Pause Code Until Code Above Is Completed

Mar 8, 2011

Ok i have this code on a button click hook

[Code]...

but if the checkbox is not checked then i want it to wait until it has copied the file before deleting it because at the moment it deletes it quicker than it copies it and the file could be different size everytime so i cant just put a simple timer of say for example 5 seconds in.

View 2 Replies

VS 2010 Copy / Paste Code From A PDF To VB 2010 Express

Oct 7, 2010

I am learning VB for the moment. I want to copy/paste code from a PDF to Visual Basic 2010 Exppress, but if i paste the (structured in PDF) code to VB, i get 1 long string of code and need to restructure it by entering after each line. Otherwise VB gives me a lot of errors. This is a time consuming work. Isn't there a way, VB puts the code in the right format?

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

VB 2010 Re-use Of Code?

May 15, 2012

wasnt sure here or games but code applies to vb 2010 more than a game so...Right, this is the second time i've typed this so i'll keep it brief( didnt post last time )im making an rpg game for the hell of making an rpg game and to display the players health im using a case select code which selects one of 20 jpg images depending on the percentage of the chars health (health / max health * 100)

Here is the code :
Select Case monsterhealth / monsterhealthmax * 100
Case 96 To 100

[code].....

View 2 Replies







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