I'm looking for a beautifier or reformatter for SQL that is written in C# in order to programmatically beautify my SQL output. It does not need to have colouring, but indention and line breaks would be very nice.
Does anyone know of such a component ?
There is now a new option. Check out NSQLFormatter project. On Nuget or Github. 100% Opensource and free.
The below could be an option for you?
SqlParser
Related
I use SublimeLinter for Python, PHP etc. and was wondering whether C# linting / syntax checking was available as a plugin.
If not, what is the best way to go about making one? I have Visual Studio 2010 so is it a case of the plugin pointing at a checking program, or is it not that simple?
Also as a bonus, a list of other tools that make C# development in ST2 easier would be appreciated.
Sublime Text 2 already contains a codex for C# and it is well developed. If you want a plugin you'll have to look on their forums.
Is there an interactive shell for programming quick code snippets in C#/.NET? Sometimes I'm interested in trying out a quick block of .NET code without creating a whole console application (that I then have to delete when I'm done).
I understand that the Immediate Window sort of provides this functionality, but it seems like you have to have an application open and be debugging it for the Immediate Window to be of any use.
I was tinkering with Ruby a while back, and the Interactive Ruby Shell (irb) was an invaluable little tool for trying out little snippets of Ruby code. Lightweight and instantaneous. This kind of thing seems like a no-brainer to me. Does anything like it exist for C#/.NET?
LINQPad is very neat for that:
LINQPad is more than a LINQ tool: it's an ergonomic C#/VB/F#
scratchpad that instantly executes any expression, statement block or
program with rich output formatting – the ultimate in dynamic
development. Put an end to those hundreds of Visual Studio Console
projects cluttering your source folder!
There isn't a full interactive shell for C#. However, for many things, you can use LINQPad to quickly try out a snippet of C# code. While it's intended for LINQ testing, it works for other C# code as well.
For details, see LINQPad as a Code Snippet IDE.
The Mono project has an interactive shell.
Also, you can use the Snippet Compiler.
There was one published by the Mono Project a while back.
Yes, there's one for mono mono-project.com/CsharpRepl
I know this is an old post, but I am new to C#. I actually found a dotnet tool that is pretty much like Java's jshell. To install simply go to powershell and enter:
dotnet tool install dotnet-repl --global
dotnet-repl.exe
Screen Shot of dotnet-repl
We've just released a small REPL tool for C# with code completion and everything called CShell.
http://cshell.net
You can also write scrips and then send them to the REPL or just write your snippets right in the REPL.
It's still in beta, but it works pretty well!
.Net Fiddle https://dotnetfiddle.net/ is an option. Not exactly an interactive environment where you can try out any expression. In .Net Fiddle, you can change the project type, compiler version, etc.
LINQPad is very good, but if you are into a quick (no installation) C# snippet testing without external dependencies (files, databases etc.) you can also use Rextester.
However, notice that its compiler version is 4.0.30319.17929, so fancy things from C# 6.0 like interpolated strings, null conditional, property initializers will not be available.
It is called snippetcompiler, will search for the url...
Are there any good code snippet plugins for visual studio? I want a plugin which can use a online snippet site (such as snipplr). It should be easy to both find and upload snippets.
You might consider snip2code plugin for VS2010.
It's interesting, I got it online...
Allows to search for your own snippets and public as well. Quick collector of code.
yes CodeKeep
There is http://www.int64.io.
It allows you to store snippets online. You can organize your snippets into "boards", give them tags, search (in near future), etc. It doesn't have a Visual Studio plugin yet, but it's coming.
Disclaimer: I'm the owner of http://www.int64.io
You might consider http://code.google.com/p/cr-codetweet/
I found a C# game http://www.codeproject.com/KB/game/BattleField.aspx that does what I need to learn. The source code is poorly formatted and hard to follow. I used Visual Studio's format document, but the format is still bad. How do I reformat the source code to make it easer to read?
Visual Studio's format document should help.
That being said, if you want more elaborate reformatting, you'll need a third party tool. Resharper, for example, has the option of reformatting the code, but also of doing code cleanups (where small refactorings are done on the fly to make the code itself nicer).
They provide a temporary free trial - you can see if it works for your case and this project.
That codes requires refactoring and commenting. Visual Studio can help, but this work is not fully-automated as you understand :)
I want Compact a Access DataBase File in C# by Code.
please Help me
Edited: I USe Microsoft Access 2007 DataBase File
The easiest way is going to be by using the standalone program “JetComp.exe” and just calling that from your c# code
http://download.microsoft.com/download/access2000/utility/1.0/win98me/en-us/jetcu40.exe
Another option would be to open a DAO connection to the database and use the .CompactDatabase method. Not being a c# bod I cant really offer a code sample but it is quite easy to do in VBA, for that reason I would just use the first option
I would use Jet Replication Objects (JRO). For example code, see here.
Not a C# programmer...but could you Shell to something like:
c:\myFolder\myAccessDatabase.mdb /compact
This as you can see uses the command line switch /compact.