JavaScript Editors for .NET Programmers - c#

I am a .NET developer, what JavaScript code editor would make sense to use if I spend most of my day in Visual Studio?

For a .NET programmer, I would think Visual Studio 2008 -- using jQuery with the vsdoc files.

You can use Notepad++.Other editor also you can use is Yaldex.

Try Far Manager and its built-in editor together with Colorer-take5 plugin. Very good solution to the source code managing and editing.

Related

Is there a way to generate C# Code from Class Diagrams?

I am using Visual Studio 2019. I cannot seem to find any option to make UML Class Diagram and generate code from it. The language which I'm working on is C#. If there is a way to do it, kindly tell me which libraries and frameworks are required in Visual Studio. You can also recommend another IDE if it does the job with a little briefing. Thank you.
First, you need to install Class Designer component. https://learn.microsoft.com/en-us/visualstudio/ide/class-designer/how-to-add-class-diagrams-to-projects?view=vs-2019
After your design you can generate de code: https://learn.microsoft.com/en-us/visualstudio/modeling/generate-code-from-uml-class-diagrams?view=vs-2015
You can generate c# code from diagram with Astah UML, it is totaly free for student or it's a free trial and you can reinstall it as you want.
https://astah.net/products/free-student-license/

How to execute C# code in visual studio code on a mac

I've decided to try to learn to code in C#, mostly due to the fact I want to try my hand at deving games in the distant future. However, I now use a Macbook, and so I figured I should use VS Code. However I am unsure of how to actually execute the code once it's done.
C# execution is an add-on to the latest version of VS code. Go to the add-on tab, then search 'c#'. Install the first item on the list.
You can also consider using Visual Studio for Mac, which has C# built-in.
Maybe you can inspire from this tut http://zablo.net/blog/post/run-and-debug-asp-net-core-rc2-ubuntu-16-04

Change VB project code to C# using Visual Studio 2010

Does anyone know how to Change VB project code to C# using Visual Studio 2010?
Any help appreciated
I don't believe Visual Studio itself provides any capabilities around this, but there are various other options. There are specific converters such as the ones from Tangible. Alternatively, you could build the VB code and then decompile to C# in something like Reflector or dotPeek. (Latest versions of Reflector are not free, but there is still a version 6 release which will not have a time bomb.)
Note that a verbatim translation of the code is likely to end up calling various methods in the Microsoft.VisualBasic assembly - you'll want to do a bit more work to turn it into idiomatic C#.
Directly in Visual Studio you can't do this. However, you can use tools such as this one or this one.
Telerik has a free converter here

How to implement code folding in C#

I'm beginning to work on a COBOL/BASIC IDE at work (to replace the one that we have currently that's a slight step up from Notepad). It'll be made in C#. The management is really interested in implementing some Visual Studio type features, and a big one is code folding. I've looked on MSDN, but I didn't see any good way to collapse lines (or to add the expand/collapse buttons).
I'm assuming that the text area should be a RichTextBox. Am I off track here? I suppose it could be done with some sort of modified TreeView, but that seems a little wrong to me. Is there some way of doing this that I'm just missing?
Why not use an existing IDE and extend it? Writing one from scratch is a huge undertaking (you need a parser, lexer, syntax highlighter and more), and is even more complicated if you need to support multiple languages (you mention COBOL and Basic).
Notepad++ has syntax coloring and one can add languages to it - COBOL is one of the ones installed by default. It supports code folding and has many plugins (you can write your own, that will suit your needs).
Edit:
Eclipse is another excellent IDE that has similar support, and as mentioned in the comments has a COBOL plug-in.
I suggest you take a look at SharpDevelop. It's a pretty good IDE with a bunch of Visual Studio like features already built in. It's written in C# and fully supports code folding with syntax highlighting in several languages. Plus, it's Open Source under the LGPL license. So, if you don't want to base your app on SharpDevelop then you can still reuse some of their controls like the code editor or windowing toolkit.
You should consider adding the COBOL language to SharpDevelop instead of starting from scratch. If you can't do this, then you can still use the SharpDevelop code as a decent reference on how to make a good IDE work.
Sometimes embedding Eclipse or a full-fledged editor is not appropriate. It's overkill or overweight or wrong for some other reason. I appreciate the first inclination suggested in other posts to not re-invent here, but in some cases a small invention is what is necessary. For example, the textbox used to make Stack Overflow posts .... is neither Eclipse nor an embedded Visual Studio. I wonder why?
It's important to ask the question - build it or buy it? - but sometimes, the correct answer is BUILD IT.
XPathVisualizer provides a simple example of a code-folding text editor implemented in C#, and based on a RichTextBox. It's not VB, though - it's an XML editor. But the general principles apply.
Here's a look at it.
To implement XML syntax colorization dynamically, while the user types, it uses a separate background thread. The reasons why and some of the details are described in a separate answer on Stack Overflow.
You could do something similar for your COBOL/VB thing. XPathVisualizer is open source, licensed with MS-PL, so you can browse and borrow.
If your team is used to "Visual Studio features," then I'll assume you use Visual Studio there at the office. Here are my suggestions:
Base your IDE on Visual Studio, for the following reasons:
Use Visual Studio 2010 if possible. The SDK is greatly improved from 2008/earlier.
Use Visual Studio 2008/2005 otherwise. At the moment, all of my commercial IDE products only support 2005/2008.
If your team uses Visual Studio, they will hate Eclipse. Not even an option to consider in this case unless you choose to use an existing Eclipse plug-in, saving you the time of creating a new IDE.
If your team isn't using Visual Studio 2010, you can use the Visual Studio 2010 Shell in Integrated Mode for free (Isolated Mode is not what you want). This lets you use Visual Studio 2010 for your IDE for now, and should the team upgrade later to one of the full versions of Visual Studio 2010, the IDE for your language will cleanly integrate into the full version. Edit: Visual Studio Shell is basically the core of Visual Studio without any specific languages (C#, C++, VB, etc.) included. Microsoft provides this core for free, and it's a great option specifically for people interested in creating their own language support.
Read my answers in the following two questions:
Here's a longer post on my reasons for using 2010 over 2008: How do I implement intellisense support for a custom DLR language in VS2008?
Here's a very long answer on implementing various features (most of which are based on the 2005/2008 SDK): How do i implement intellisense for my language in visual studio?
Writing a complete IDE is a HUGE task. I would recommend trying to find an existing one that has what you want, or make adaptions to an existing open source IDE.
To answer your question: I guess that the Visual Studio IDE uses a custom control, written from scratch, rather than a RichText control.

Write visual studio project from code

Is there any way to write a Visual Studio Project file easy or do i have to look at the xml format and write it by hand?
Is there any lib for this in .net framework(3.5)?
Im using vb.net but c# would also work..
Visual Studio since version 2005 uses the MSBuild format to store C# and VB project files.
You could read this primer http://www.informit.com/guides/content.aspx?g=dotnet&seqNum=472 or search the Web for further examples.
For programmatic access you could use the classes in the Microsoft.Build.BuildEngine namespace. Probably the Project class is of most interest to you.
I haven't tried this myself but you might want to look at http://msdn.microsoft.com/en-us/library/microsoft.build.buildengine.project.aspx
We do it from a couple of in-house tools. The project files for Visual Studio are stored as XML, so you can just use whatever XML classes you prefer. Make sure you pay attention to GUIDs as they are used to tie everything together between the various files in Visual Studio.
There is no support for this in the framework. The Visual Studio project file format is specific to Visual Studio. There may be support in the MSBuild libraries but you would need to include them as a reference and interact with it that way. What are you trying to do that requires you to create a VS project file?
The link provided here should give you what you need.

Categories

Resources