Tag Archives for " Visual Studio "

2 Try .NET

Learn C# Online with Try.NET

Learn how you can run C# code in the browser and learn C# without installing Visual Studio. This is perfect when you are getting started with C# to familiarise with the language and it's also great for experienced developers.

Video Link: https://www.youtube.com/watch?v=Ff7sXQele3s

Previous Posts

Transcript Of The Video

Hi, I am Andrea and welcome to Productive C#. In this video I want to talk about Try.NET. If you are completely new to C# and you want to give it a go without installing Visual Studio, that is the main IDE that you can use to actually write and build C# applications), you can do it now, by going to try.dot.net

If you go to this URL, you will find a very simplified editor and in this case there is a program written in C# that prints the first 20 Fibonacci numbers and you can actually run it by clicking the "Run" button and you will see an execution of the C# program. Let's play a bit with it and see what the experience is. Basically you have a complete C# editor here and you also have Intellisense. Let's say I  want to create a variable, then I want to do a foreach var numbers in number , Console.WriteLine and autocomplete number and you can do run. 

So, if you are new to C# and you want to actually play with the language without installing a full fledged editor, you can do that now using this website. Microsoft is actually working on this and actually quite good. 

Even if you are an experienced developer and you want to quickly run some C# for experimentation or if you don't have a machine with Visual Studio and you don't have time to actually install it, you can just go to this website  and immediately run some C#. Pretty much all the .NET framework libraries are referenced automatically for you and you can actually start playing with it. Very very useful tool. 

In addition to that, I want to show you that Microsoft is currently rolling it out to their documentation site. So, if you go to docs.microsoft.com, that is the main website for all the documentation, you can go for example to the C# QuickStart Guide , click on that and let's say I go to Hello World, let's click "Run your first C# program". What you can see here, on the right, you find a .NET editor that actually allows you to write C# directly in the browser and that's basically powered by the same engine that I showed you before in the other website. You can run it and get the results.  So you basically have a kind of interactive way of learning C# and this is definitely a recommended way to learn C# if you are completely new to the language. Go to this website, play a bit with this tutorial and you can get good at C# without even installing Visual Studio. 

Of course, if you are serious about programming in C# and I am sure you are, you absolutely have to install Visual Studio because allows you to build any kind of applications and it's an incredible tool. But remember that you have this website available for you if you need to learn C# or you actually want to play with it very quickly without waiting to install a complete IDE. Thanks you very much for watching.

private protected

Access Modifiers in C# and Private Protected

Learn about the new private protected access modifier in C# 7.2 and how it relates to all the other access modifiers.

Video Link: https://www.youtube.com/watch?v=KTk_XNQMPr4

Transcript Of The Video

In this video I want to talk about the private protected member access modifier that has been introduced in C# 7.2. In order to do so, I'd like to have a quick look at all the other access modifiers to better understand how the new modifier works. I have a solution in Visual Studio with two projects: one console application and one library that is actually referenced by the console application. The first modifier we are all familiar with is Public. When I declare a member as Public, means that everyone can access it, inside the assembly or outside. If you make a member Private, you can't change it outside the context of the class. The next access modifier is Protected. Now all the types that derive from Shape are able to access the member. However, you are not able to create an instance of a shape and change the member. Only the classes themselves are able to change the member. The other modifier is Internal. This means that this member can be accessed everywhere inside the assembly where it belongs. However, the member is inaccessible outside the assembly boundary. The next level is Protected Internal. It's the combination of the previous two using OR. It is Protected or Internal. The member can be accessed everywhere inside the assembly where is defined and also can be accessed in all derived types regardless in which assembly they lives. In C# 7.2 a new modifier has been added and it is called Private Protected. It gives access to a particular member only to derived types inside the assembly where is defined. Everywhere else is inaccessible. It is the combination of Protected and Internal. There was no way to do this before.  This is a new modifier that gives you an additional level of power in defining how you want to encapsulate your members. This access modifier was already available in the CLR so no changes were required in the CLR to implement this feature. It was never been implemented in C# mostly because it was quite difficult to name. It can creates a bit of a confusion. The best way to see it is: Private Protected is Protected And Internal while Protected Internal is Protected Or Internal.

Previous Posts

Productive C# Logo

Top 10 Productive C# Videos of 2017

This is the list of the top 10 most watched Productive C# videos of 2017.

1. Generalized Async Return Type (ValueTask) in C# 7

Learn how to use the generalized async return type feature in C# 7 (more specifically ValueTask) in order to improve the performance of you application by reducing memory pressure. ValueTask is particularly useful when you repeatedly call asynchronous methods

2. Async Main in C# 7.1

Learn how to use the new Async Main feature in C# 7.1. You can use async in the entry point of your console application using Visual Studio 2017.

3. Using Static Declaration in C# 6.0

Learn how to use the using static declaration to make your C# code more compact.

4. SelectMany in LINQ

Learn all the possible ways to use SelectMany in LINQ to implement sophisticated queries who need to flatten sequences of sequences in C#

5. How to configure the C# language version in VS 2017

Learn how to configure your C# Visual Studio 2017 project to compile against a specific version of the C# compiler and use the latest features of the C# language.

6. Azure Functions in C#

Learn how to create, debug and deploy azure functions using C# and Visual Studio.

7. Implementing Equality

Learn how to implement equality for value types and reference types in C# with some help from ReSharper.

8. Sequence Equality

Learn how to check if two lists or sequences are equal.

Did you know Microsoft implemented this for you in the .NET Framework 3.5?

9. Default Expressions in C# 7.1

Learn how to use default expressions in C# 7.1

10. Sorting in LINQ

Learn how to sort collections in ascending and descending order using LINQ in C#. Use methods OrderBy, OrderByDescending, ThenBy and ThenByDescending or use the query syntax if you prefer.

Do you like the videos and want to become a master C# developer?

Make sure you subscribe and received a message when new videos are released.

Join Productive C# Now

 

2 Azure via C# – Azure Functions in C#

New video from the Azure via C# video series to learn how to create, debug and deploy Azure functions using C# and Visual Studio 2017.

Azure Functions in C#

Learn how to create, debug and deploy Azure functions using C# and Visual Studio 2017.

Previous videos

 

1 Practical C# – How to configure the C# language version in Visual Studio 2017 projects

New video from the Practical C# Video series to learn how to configure the C# language version used.

How to configure your project C# language version

Learn how to configure your C# Visual Studio 2017 (Update 3) project to compile against a specific version of the C# compiler or the latest release.

Do you like these videos? Subscribe here

Previous videos

2 Practical C# – Project References

New video from the Practical C# Video series to learn how project references works in C#.

Project References in C#

Let how to add a project reference using Visual Studio 2017 and what happens under the cover. Learn how the new csproj syntax introduced in Visual Studio 2017 greatly simplify how to work with project references.

 

Do you like these videos? Subscribe here

Previous videos

1 2 3 4
>