 
      
    | You are here | nodogmablog.bryanhogan.net | ||
| | | | | connorberry.com | |
| | | | | Language Comparison Perl: while (<>) { print "$. : $_" } Perl: while (<>) { print "$. : $_" } CSharp: using System; using System.IO; class App { public static void Main(string[] args) { int line_number = 1; foreach (string arg in args) { foreach (string line in File.ReadLines(arg)) { Console.WriteLine(line_number + ":" + line);... | |
| | | | | csharp.christiannagel.com | |
| | | | | ASP.NET Core included the WebHost class that was used in the Main method to startup everything up - including the dependency injection container. With Non-ASP.NET Core applications I used the same DI container (Microsoft.Extensions.DependencyInjection), but I had to create the ServiceCollection on my own. This changes with .NET Core 3.0 and the new Host class... | |
| | | | | danielpecos.com | |
| | | | | Para retomar de nuevo la marcha del blog, he decidido comenzar mostrando algunos ejemplos de programación en C#. Por el momento os dejo el obligatorio programa para todo aquel que empieza con algún lenguaje. Hola Mundo! using System; namespace HolaMundo { public class HolaMundo { public static void Main (string [] args) { Console.WriteLine ("Hola Mundo!"); } } } Sencillo, ¿verdad? Tiene mucha semejanza con Java, exceptuando que las palabras reservadas difieren y que Java no posee el concepto de espacios ... | |
| | | | | nodogmablog.bryanhogan.net | |
| | | Full source code available here. Did you know that .NET Core 2 can pass in an instance of any type you want to the Startup.cs constructor? Well you can! Here's how. | ||