What is the difference between Class and Code File in ASP.NET Core?

8

What is the difference between Class and Code File in ASP.NET Core?

There are two types of files in asp.net core, are there any differences between them?

And when should we use each?

    
asked by anonymous 27.03.2018 / 15:48

1 answer

3

The "Class" option generates a C # code file with a basic class structure, like this:

using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApp1
{
    class Class1
    {
    }
}

"Code File" generates an empty source code file, where you have to write everything from scratch. In practice the only difference is the template used in the first one.

    
27.03.2018 / 16:15