Saturday, January 13, 2018

C# Inexis Enhancement

Enums
  [Flags]
    public enum Sources
    {
        [Display(Name = "TBA")]
        TBA = 1,
        [Display(Name = "CMAA")]
        CMAA = 2,
        [Display(Name = "RTAA")]
        RTAA = 4,
        [Display(Name = "TBA Test")]
        TBATest = 5,
        [Display(Name = "CMAA Test")]
        CMAATest = 6,
        [Display(Name = "RTAA Test")]
        RTAATest = 7
    }

.net core


commands

> dotnet (show comman navigation)
>  dotnet --version (.net core version)
> dotnet --help (show all help info)
> dotnet new (newly added features)

>dotnet new console (create new .net core console application)

Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----        1/14/2018   9:45 AM                obj
-a----        1/14/2018   9:45 AM            186 Program.cs
-a----        1/14/2018   9:45 AM            178 test.csproj

> type test.csproj (show .csproj content)

<Project Sdk="Microsoft.NET.Sdk"> // use

  <PropertyGroup>
    <OutputType>Exe</OutputType> // outout as executable file
    <TargetFramework>netcoreapp2.0</TargetFramework> //.net version
  </PropertyGroup>

</Project>


.net core web application .csproj file content

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>netcoreapp2.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <Folder Include="wwwroot\" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.5" />
  </ItemGroup>

  <ItemGroup>
    <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.1" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\Resources\Resources.csproj" />
  </ItemGroup>

</Project>




CS Events