McCormick
McCormick
CC#
Created by McCormick on 12/24/2023 in #help
The result won't be shown in console
1. Code (Where result won't be shown in console)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _Data1
{
internal static class Cals
{
public static void Data2(int a = 10, int b = 20)
{
int g = 20;
int v = 40;

int result = (a + b) * g / v;

int h = result;

Console.WriteLine($"The result of h: {h}");
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _Data1
{
internal static class Cals
{
public static void Data2(int a = 10, int b = 20)
{
int g = 20;
int v = 40;

int result = (a + b) * g / v;

int h = result;

Console.WriteLine($"The result of h: {h}");
}
}
}
2. Code (Everything normal)
enum WeatherData
{
Morning = 7,
Afternoon = 16,
Evening = 17,
Night = 12
}

public class Program
{
public static void Main(string[] args)
{
PrintWeatherData();

}

public static void PrintWeatherData()
{
int morningValue = (int)WeatherData.Morning;
int afternoonValue = (int)WeatherData.Afternoon;

int result = morningValue + afternoonValue;

Console.WriteLine($"Morning + Afternoon = {result}");
}
}
enum WeatherData
{
Morning = 7,
Afternoon = 16,
Evening = 17,
Night = 12
}

public class Program
{
public static void Main(string[] args)
{
PrintWeatherData();

}

public static void PrintWeatherData()
{
int morningValue = (int)WeatherData.Morning;
int afternoonValue = (int)WeatherData.Afternoon;

int result = morningValue + afternoonValue;

Console.WriteLine($"Morning + Afternoon = {result}");
}
}
80 replies
CC#
Created by McCormick on 12/2/2023 in #help
Top-Level statements must precede namespace and type declarations
No description
5 replies
CC#
Created by McCormick on 11/26/2023 in #help
✅ Method creation
No description
9 replies