As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
So I have a few developer questions to ask....
Is there ever a certain amount of lines of code after which the program will slow down?
For example, my current major project has a total of over 6000 lines of code (including white-spaces). If this is bad, how can I spread my code out?
In Visual Studio 2012, how do I create a Class Library to hold a lot of my methods/utilities? I have seen that Visual Studio 2010 has the feature but 2012 doesn't. Also, will I benefit from a class library?
My current project layout is ONE .exe file with all the internal code etc compiled inside, I also have a number of icons as embedded resources. Does this affect performance?
Thanks!
Lines of code are irrelevant. What matters is your code.
To create a Class Library check out this link. Sure you will benefit, you can build classes that can be used on other projects. The logic for web is on the System.Web DLL, you can choose to include it or not in a project. You can reuse code.
Embedded resources will not affect performance, but it will probably make your exe file bigger.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I was just wondering when is it recommended to make dll's, when your project is over 1000 lines, 5000lines, more? Also should I make dll's for WPF controls that WinForm project uses?
Or maybe when the project has reached some number of classes?
Thanks in advance
This is entirely a matter of personal opinion, but if you're breaking up into projects due to line count or number of classes, you're doing it wrong. you should have a project (and thus a dll) for every high level logical grouping within your solution. you might have a data project, a domain project... etc. if you're going to be reusing code across solutions, then yes, you'll need a dll for that, or a shared project, or something similar.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
In VS 2010 Web application, I have few design pattern classes Singleton & Factory etc, currently residing in Util Folder. Would it be correct to move them into App_Code folder.
As per the layered architecture what is the recommended place to put them into ?
Thank you for your help.
Different teams have different naming / structure conventions. I have seen Util folder used, Helper folder etc - just check with the team where they would all be happy to house the files.
Also, as you mentioned APP_CODE, are you using Web Project instead of Web Application?
http://msdn.microsoft.com/en-us/library/dd547590.aspx
It's absolutely up to you, or up to the dev-group to decide ho to design layout of these kind of files.
So feel free to pick the most approriate layout for you.
You should structure them in your application as they conform to the model they ultimately represent. There's no pre-defined 'right way' to do it. The system you're modelling is the driving force.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have a small C# app and I'd like to provide the ability to preview diffs and accept changes. My inputs are only text files. I came across some tools like kdiff3 and winmerge and I was wondering if anyone's integrated them inside a C# app and if yes, how was it done? I also came across some nice projects on CodeProject from an earlier stackoverflow question but since those projects were written in 2004, I was wondering if you have any suggestions for an open source diff and merge tool that I can integrate? Thanks!
Have you checked out csdiff ?
http://code.google.com/p/csdiff/
You might want to checkout DiffPlex. It is (amongst other things) a library that can be used to generate text diffs. It also provides some higher level classes that provide a more complete "diff model" that should be easier to use for rendering diffs in, say, a textbox.
Personally, I have only used it for minor tasks, but it looks powerful enough to handle more sophisticated scenarios as well.
Winmerge, as you mentioned, can be integrated with other apps via the command line. Here's an example of visual studio using these command line parameters to replace the built in diff client. In regards to launching winmerge itself, I found this simple example of how to call an external program from C#.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I want to generation automatically Resx files for my project, I've heared that there's program which does it.
Can anyone tell me it's name?
The only program I know is Visual Studio. You can easily create your own program by using the ResXResourceWriter class.
As Hans stated, for components such as forms and user controls, you can do this via the "Localizable" property. For other ".resx" files, you can easily create your own localized ".resx" file but it needs to be properly named (you can read up on this - Google for "satellite assemblies" for starters). If your goal is dealing with translations in general however, then unless your app is very small, this approach is difficult, tedious and error-prone (trying to track changed strings on your own for instance, whose existing translations have become obsolete). There are 3rd-party packages that can help you however, and I'm the author of one of them (in the interest of full disclosure). See http://www.hexadigm.com.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm looking to make calls out to a subversion repository, but I would like to write it in C#. Does anyone know of any good libraries?
Have a look at SharpSVN. This is an open-source binding of the Subversion Client API for .Net 2.0 applications.
For example, this library is used by the AnkhSVN Visual Studio Add-In.
I recommend you look at the Tortoise SVN source code.
It is mostly in C++, but since it is all done in VS, it should be easy to wrap up and use much of the code again.
You can also try SubversionSharp if you want less heavy lifting (however it is not yet a stable release, so be cautious).
How about SubversionSharp.