5 incredible new features in VS 2015 preview version, 2015 New Features
Visual Studio 2015 Preview contains many powerful new features, whether you are engaged in WEB application development, desktop application development, or even mobile application development, VS 2015 greatly improves your development efficiency. The Editor supports Gesture Recognition, Cordova toolkit, C ++ enhancement tool, and the latest Android simulator. Some other features are rarely mentioned, but I personally think we can also benefit a lot from VS 2015 development. Let's take a look.
1. Custom window layout
If you develop applications on multiple devices, this feature can be easily developed. For example, if you use Surface Pro for development on a home train and develop it on a 23 inch display at work, you can use Window-> Apply Window Layout to quickly switch the development environment Layout to adapt to the current device type. If you log on to VS 2015, you can also use the shortcut key to switch the development environment layout, which is very convenient.
Select Visual C # Shared Project, create a class named Person. cs, and write the following code:
?
12345678 |
class Person { public string FirstName { get ; set ; } public Person() { FirstName = "Michael" ; } } |
Create a console application and reference the Shared Project you just created to write the following code:
?
123 |
var person = new Person(); Console.WriteLine(person.FirstName); Console.ReadLine(); |
You can also create a WPF Application to reference the Shared Project. The following is my Project structure:
4. Code smart prompts in Bower and NPM
If you create an ASP. NET 5 Web application, the system automatically generates the following directory structure for you:
Here, a folder named Dependencies will be generated, which contains Bower and NPM. Generally, You can regard Bower as a client development kit, such as the jQuery and Angular script libraries; we can regard NPM as a development tool, such as Grunt and Gulp. These sdks are managed in a unified way through a JSON file.
- Bower. json for Bower
- Config. json for NPM
If you want to add a class library to Bower, open the bower. json file and add your own class library. In the following example, I want to add the latest Angular library, but I do not want to open the Angular website for download. The specific operations are as follows:
1234List<
int
> elements =
new
List<
int
>() { 10, 20, 31, 40 };
// ... Find index of first odd element.
int
oddIndex = elements.FindIndex(x => x % 2 != 0);
Console.WriteLine(oddIndex);
This program will output 2 in the console. If you want to view the execution results of each step, you can refer:
In this example, we add a monitor and breakpoint and add the following code:
?
1 |
elements.Where(v => ( int )v > 11).ToArray() |
As expected, the program returns three results greater than 11 so that we can debug the application more conveniently and directly.
5 Incredible Features in the Visual Studio 2015 Preview