code-conversion

ADO.NET Data Services Query Interceptor - can anyone tell me the VB syntax of this C#?

Hi folks, I am pretty new to VB.NET - and I'm struggling to convert the signature of the method in the following code snippet. The Expression<...>> bit. Thanks in advance. [QueryInterceptor("Orders")] public Expression<Func<Orders,bool>> OnQueryOrders() { return o => o.Customer.ContactName == HttpContext.Current.User...

Does the GPL license contaminate?

Quick Question. I am doing a conversion of JavaScript code licensed by GPL (and not created by me) into PHP. Does the original GPL stand or can i put any license on the converted code? I found this on SO, but wondering if it applies. ...

Good way to convert VB.Net to C#?

Are there any good conversion tools out there to convert VB.Net code to C#? FREE developerFusion Telerik CodeConverter SharpDevelop PAID VBConversions Vbconversions VB.Net to C# Converter Download3000 VB.Net to C# Converter ...

Using Delphi to creating Win7 Jump list

I'm trying to create Jump list on windows 7 for my application using Delphi. I found this c++ code, but I'm not sure how to translate it to Delphi, any help? void CreateJumpList() { ICustomDestinationList *pcdl; HRESULT hr = CoCreateInstance (CLSID_DestinationList, ...

Need some help converting VB.NET code to C#

Hey SO, I have a CRC class written in VB.NET. I need it in C#. I used an online converter to get me started, but I am getting some errors. byte[] buffer = new byte[BUFFER_SIZE]; iLookup = (crc32Result & 0xff) ^ buffer(i); On that line, the compiler gives me this error: Compiler Error Message: CS0118: 'buffer' is a 'variable' but ...

How do you return 'not uint' in C#?

Hi, I have some code written in VB that reads as follows: Return (Not (crc32Result)) I am trying to convert it to C#, and this is what I have: return (!(crc32Result)); However I get a compiler error: Compiler Error Message: CS0023: Operator '!' cannot be applied to operand of type 'uint' Is there a different operator I need t...

Need a little more help converting a CRC function from VB.NET to C#

I probably should have just put all this in one question, sorry for that :( Second error Ok, this should be the end of errors (hopefully): private static string getCRC(string input, bool appendDate) { string toEnc = string.Format("{0}{1}", input, appendDate == true ? string.Format("{0:yyyyMMdd}", System.DateTime.Now) : ""); Sy...

Convert VB to C#: Email sending routine

I am new to C# and have a VB sub routine for sending emails. I am not sure how to convert to C#, can someone please help me? here is the sub: Sub SendAdditionalEmails() Dim strDelimeter As String = "," Dim strEmailResult As String = "" 'make sure they dont put a comma on the end (To) If InStr(Len(txtTo.Text) - 1, txtTo...

convert this c# dictionary to vb.net

one more question on converting c# to vb. conversion tool is not doing a good job. Please let me know. Thanks private static readonly Dictionary<string, List<string>> ValidHtmlTags = new Dictionary<string, List<string>> { { "param", new List<string>() {"name","value"}}, { "object", new List<string>() {"id","type"}}, { "embed", ne...

Starting a process and listening for exit event

I have some code that starts a process and hooks up an event handler to handle when the process exits, the code I have is written in C# and I wonder if something similar is possible with Delphi. System.Diagnostics.Process myProcess = new System.Diagnostics.Process(); myProcess.StartInfo.FileName = "notepad.exe"; myProcess.EnableRaisingE...

.NET to Java code transform

Hi all, I know about IKVM.NET that converts Java bytecode to .NET CIL. Is there a tool that performs reverse conversion? either with or without support for translating WinForms to JavaFX/Swing GUIs. Thanks. ...

How do you port an open source project?

I am curious as to how people port open source projects such as Lucene and Hibernate from Java to .NET? Is it a simple matter of using the Java Language Conversion Assistant 2.0 released by Microsoft? ...

Converting Code Snippet from C# to VB.NET

All the automated, online converters weren't able to convert this code. Unfortunately my brief knowledge of C# has also let me down. The code originates from a blog, linked from another of my questions. Here is the code snippet in C#; var virtualFileDataObject = new VirtualFileDataObject(); virtualFileDataObject.SetData...

Converting ASP.NET web site to MVC2

I have my existing web site developed using ASP.NET. It's college management system. Now I need to redevelop it on MVC2. What all changes do I need to do? I am little bit aware of MVC and have done some exercises also. Thing I know is I can keep my database intact but there will be massive changes at other places. WHat will be the better...

How would I shorten this If... Else... statement to check the state of a Date?

I am a C# programmer but dabbling in VB.Net because everybody else in my team uses it. In the interests of professional development I would like to shrink the following If... Else... statement. If cmd.Parameters("@whenUpdated").Equals(DBNull.Value) Then item.WhenUpdated = Nothing Else item.WhenUpdated = cmd.Parameters("@whenUpda...

java decimal string to AS 3.0 conversion procedure

Hello, I have a problem with conversion java code to action script 3. Anyone can help with code translation? Thanks. public static short[] decmail_str_to_binary_data(String s) { short[] data = new short[s.length()/2]; for (int i = 0; i < s.length(); i += 2) { char c1 = s.charAt(i); char c2 = s.charAt(i + 1);...

Using ScriptGetProperties with Delphi

How can I use ScriptGetProperties API from Uniscribe Dll (usp10.dll) in Delphi I found an example in C++, but I don't know how to translate it, because I'm not good on C. const SCRIPT_PROPERTIES **g_ppScriptProperties; int g_iMaxScript; WCHAR *pwcInChars = L"Unicode string to itemize"; int cInChars = wcslen(pwcInChars); const int cMax...

How to convert a vb.Net 4.0 project to C# 4.0 project?

I looked into: http://www.developerfusion.com/tools/convert/vb-to-csharp/ as well as: http://www.icsharpcode.net/opensource/sd/ but neither does exactly what I want. EDIT: The first link translates only the source code (.vb) and does a good job at it. I also need to convert the project. The second link ... #develop does not handle...

how does vbscript evaluate string greater than string?

i'm converting some vbscript from an asp app and ran across a line in the form of If sCode > "" Then where I expect sCode to contain a string. i know enough vbscript to plod through it but i'm not sure of the behavior of some quirkier statements. c# will not accept that as a valid condition check. what is an equivalent c# statement? ...

C# to VB.NET Code Converter

Hello, I need a C# to VB.NET code converter, and I'm willing to pay. I want something that's ultra convenient, as I want to reduce the amount of copy/paste that I have to do... so could anybody give me some tips to what is out there? I want processing in bulk too, and to support the latest operations (LINQ, new VB inline-function supp...