C#C
C#2y ago
cexiav

The result won't be shown in console

  1. Code (Where result won't be shown in console)
    ```cs
    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)
cs
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}");
}
}
```
Was this page helpful?