Convert VB.NET code to C# [closed] - c#

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
Is there a library that I can use to convert VB.Net code into C#? There is http://codeconverter.sharpdevelop.net/ but i don't want to use it from a web service.

Open your assembly in .NET Reflector. Choose language C#. Copy/paste source code to Visual Studio. Try to compile.

There are plenty online services: Telerik provides one, here's one other and one of the best is on developer fusion. But these are all online.
I've had good experiences with Instant C# of Tangible Solutions, they provide good services for each bug you encounter after conversion. Other than that, many others are available through Google.
If you use Reflector, a few notes: it doesn't translate your source code, but the compiled code. This can make a huge difference in logic inside methods and above all, you loose all your (xml) comments and possibly your file structure (partial classes are not recognized, for instance). Reflector is virtually unusable when it comes to ASPX and inline code. But it is an excellent free tool in all other respects

Just download SharpDevelop 4.4, it contains the same converter for offline use.
Actually, the SharpDevelop converter is even better than the online converter as it can take a look at your whole project and your references.
The SharpDevelop source code repository also contains the full source code for that website. It's all open source.

Related

Is there a Model Checking software (like Java Path Finder) but for C#? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
<EDIT>
About this question being off-topic and too opinion-based, I'll try to be more clear. My goal was to undestand if such a tool existed, I was not interested in opinions about what was the best one. At the time I wrote this question I spent quite a good amount of time searching the internet and found just old dead projects but such a tool for java existed and I couldn't belive there were nothing for c#.
I think this question is related to programming (code verification), and it is not really asking for an opinion. Also, it's still not easy to find this information and I think my answer could help saving someone's time.
That said, I'm not an expert of stackoverflow, if you still think the question/answer does not fit the site feel free to delete it.
</EDIT>
I've found Moonwalker http://fmt.cs.utwente.nl/tools/moonwalker/ but the last update has been done in 2009 and i don't think it supports .net4.5 (and it's poorly documented).
The answer to this question propose CodeContracts as a model checking tool Model checking tool c# but I've tried using it and I don't think it really is a model checker, not in the same way Java Path Finder for Java is. Im i worng? Can it be used like JPF?
I need to be able to known if a certain part of code is designed in a way that can deadlock. Let's say it's a school thing and even if I'm sure my code is working I must model check it. (Yes we are allowed and encouraged to look on the internet).
As the user #HighCore said, and after lot of searching i can say that a mature and up-to-date tool like the one I described does not exist.
Model checking refers usually to explicit methods, however symbolic methods are equally advanced and arguably more capable for establishing properties of actual code.
For a Turing complete language, the verification problem is undecidable, so model-checking tools usually accept a less powerful language as input. This implies having to convert your problem to that language, before checking. This is why you have not come across any "C# model checking tool".
Have you looked at Boogie and the C#-like Dafny ? These are (essentially) for annotating with Hoare logic.
Alternatively, you can consider model checking your C# solution after (manually) translating it to Promela, then using SPIN.
Related tools (e.g. C-to-Promela translators) are listed here.

What to use for writing blog in my website [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I want to develop my blog website in ASP.NET. What could be the best way I can write my blog through?
I mean will Tiny MCE work for me, last time when I used it I faced terrible formatting issues. Because my blog will include code, different formatting, pictures etc. Please suggest me how to post blog?
I am using ASP.NET 3.5 and SQL Server 2005.
Why write your own from scratch? Take a look at Orchard CMS. It's an opensource .NET CMS being developed with help from Microsoft http://www.orchardproject.net/
Its fairly new, so there's still some features missing, but its really easy to get setup and since you're a .NET developer you can add your own functionality.
I agree with Jamiegs. Blogging is by and large a solved problem. Why not use an existing package? Most packages will include much more than anything you'd put together in your spare time not to mention that you'll benefit from all of the field testing too.
I settled on hosted Wordpress and just pointed my domain there. Hosted Wordpress is somewhat more limited than self-hosted (you can't install your own themes, etc...) but I've hardly found it restrictive. Their documentation around the various shortcodes for displaying source code or embedding maps is pretty complete.
I have been using Obout's html editor almost a year now without any problems. http://obout.com/editor_new/sample_full.aspx . Ajax Toolkit has free lite version of Obout's editor.

Free/open source code editor UI control for .Net [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm looking for a free, syntax-highlighting, possibly autocompleting "Programmer's textbox" style control for use in a Visual Studio Windows Forms or WPF project. It should work with C# and self-defined languages, and the licence should permit its use in a closed, in-house development tool.
There are pay-for solutions available - something like http://www.syncfusion.com/products/user-interface-edition/windows-forms/Edit would work fine - but I am looking for something simpler, and would prefer not to pay for unnecessary functionality. Any ideas?
I've been using the SharpCode.TextEditor for a few cases, and it works quite well - including syntax highlighting and all.
Check out this Using ICSharpCode.TextEditor article on CodeProject for an intro.
To download it, go to the SharpDevelop web site and download the latest sources. One of the projects included is the Text editor, which you can easily isolate into its own assembly or sub project - you get all the source code, after all!
Scintilla is a powerful, open-source code editing component, and there is a .NET control available for it.

Design-Time Tutorials [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am looking for some (preferably) online tutorials on making controls with 'Rich design-time support'
By Rich design time support i mean like how the menustrip works on a form and such.
Any links to websites, good books or code samples (c# or vb.net) would be great.
You can start with Dissecting A C# Application which goes into many aspects of creating SharpDevelop, C# IDE written in .NET. This covers many aspects of the designer architecture and it is free in a PDF. However, the PDF is hard to find (original links no longer work, but I believe this is a valid copy).
While that will get you started on the ins and outs of the designer, it probably doesn't go into detail on some of the more interesting features such as actions and tasks. For this, MSDN has some extensive information and examples (it didn't used to).
Finally, I find the best resource to be .NET Reflector. Using this tool to look at how Microsoft has done it in various places within the framework has been a great learning exercise when working in design-time support areas. Find a control that does what you want and then go see how it does it.
All of these resources are free, however your time is not. I have found that design-time support can be a breeze in some areas but a complete nightmare in others. Good luck.

Tool recommendation for converting VB to C# [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
We have a project with over 500,000 lines of VB.NET that we need to convert to C#. Any recommendations, based on experience, for tools to use? We are using Visual Studio 2008 and we're targeting 3.5 .
I would concur with the comment. You have 500,000 lines of tried and true VB.NET code. Why on earth would you waste any time changing that? No one says that you can't write all new components in C#.
I would consider not worrying about a tool and instead ask yourself, truly, why you are doing this?
Reflector will decompile the IL and produce C# for you, it will be rough, but a decent start.
Did this eval a while back. You will find a lot of "free" solutions that are horrible at edge cases. This commercial product http://www.tangiblesoftwaresolutions.com is by no means perfect; but, was the best we could find at the time doing real conversion tests. Note: I am speaking only as a customer. If someone has found a solution that in real-world use produces better conversions than this, please let me know.
SharpDevelop has a converter built-in IIRC.
The converter from Telerik works well.
http://converter.telerik.com/
http://converter.telerik.com/batch.aspx
There used to be an add-in to Reflector which creates a complete Visual Studio solution. However, I don't know if it's still available or working, now that Red Gate has taken over Reflector.
I've used this site for a while now for some of my smaller conversions. It has been quite reliable.
According to the site, their converter is based off an open source IDE that has the converter built in, so you might try the "source site" as well.

Categories