Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions enum/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/bin/Debug/netcoreapp2.1/enum.dll",
"args": [],
"cwd": "${workspaceFolder}",
// For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
"console": "internalConsole",
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
,]
}
15 changes: 15 additions & 0 deletions enum/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/enum.csproj"
],
"problemMatcher": "$msCompile"
}
]
}
37 changes: 37 additions & 0 deletions enum/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using System;

namespace enumpractice
{
class Program
{
public static void Main(string[] args)
{

Console.WriteLine("Please enter the MONTH you were born in, as a number: ");
string dateMonth = Console.ReadLine();
int dateMonthInt = Convert.ToInt32(dateMonth);

Console.WriteLine("Please enter what DAY of the month you were born on, as a number: ");
string dateDay = Console.ReadLine();
int dateDayInt = Convert.ToInt32(dateDay);

Console.WriteLine("Please enter ANY YEAR to see what day of the month your birthday lands on in any given year: ");
string dateYear = Console.ReadLine();
int dateyearInt = Convert.ToInt32(dateYear);

DateTime dt = new DateTime(dateyearInt, dateMonthInt, dateDayInt);
int dayOfWeekInt = (int)dt.DayOfWeek;

Console.WriteLine("The day of the week for {0:d} is {1}.", dt, (Days)dayOfWeekInt);
}
}
public enum Days
{
Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
}



}


8 changes: 8 additions & 0 deletions enum/enum.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>

</Project>
28 changes: 28 additions & 0 deletions practice2/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/bin/Debug/netcoreapp2.1/practice2.dll",
"args": [],
"cwd": "${workspaceFolder}",
// For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
"console": "internalConsole",
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
,]
}
15 changes: 15 additions & 0 deletions practice2/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/practice2.csproj"
],
"problemMatcher": "$msCompile"
}
]
}
Empty file added practice2/Days.cs
Empty file.
45 changes: 45 additions & 0 deletions practice2/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using System;

namespace practice2
{
class Program
{
static void Main(string[] args)
{

//FOR PROJECT USE DATETIME.DAYOFWEEK
Console.WriteLine("Hello World!");
Console.WriteLine("Sunday is "+(int)Days.Sunday);
Days today = Days.Wednesday;
Days tomorrow = today + 1;
Console.WriteLine("Today is "+today);
Console.WriteLine("Tomorrow is "+tomorrow);
Console.WriteLine("If today is " + today + " tomorrow is "+getNextDay(today));
}


public static Days getNextDay(Days day){
return day+1;
}
public static bool isWeekend(Days day){
if (day == Days.Sunday || day == Days.Saturday)
{
return true;
}
else
{
return false;
}

}
}

public enum Days {
Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
}



}


8 changes: 8 additions & 0 deletions practice2/practice2.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>

</Project>