Monday :-)

This commit is contained in:
Geir Okkenhaug Jerstad 2024-11-25 10:24:10 +01:00
parent 3a981d068f
commit 11b25f5cb0
5 changed files with 16 additions and 56 deletions

View file

@ -1,8 +0,0 @@
namespace EssentialCsharp.Demo1;
public class TextObject
{
public string Text { get; set; }
public int FontSize { get; set; }
public int FontColor { get; set; }
}

View file

@ -1,33 +1,13 @@
namespace EssentialCsharp namespace EssentialCsharp
{ {
public class Tekst public class Program
{ {
public static void Main() public static void Main(string[] args)
{ {
var tekst = new TextObject[] string name;
{ Console.WriteLine("Enter Your name: ");
new TextObject name = Console.ReadLine();
{ Console.WriteLine($"Hello {name}!");
Text = "Geir",
FontSize = 14,
FontColor = 00001,
Color = ConsoleColor.Green,
},
new TextObject
{
Text = "Geir2",
FontSize = 12,
FontColor = 010001,
Color = ConsoleColor.Gray,
}
};
foreach (var tekst1 in tekst)
{
tekst1.Print();
Thread.Sleep(100);
}
} }
} }
} }

View file

@ -1,19 +0,0 @@
namespace EssentialCsharp;
public class TextObject
{
public string Text { get; set; }
public int FontSize { get; set; }
public int FontColor { get; set; }
public ConsoleColor Color { get; set; }
public void Print()
{
Console.ForegroundColor = Color;
Console.WriteLine(Text);
Console.WriteLine(FontSize);
Console.WriteLine(FontColor);
}
}

View file

@ -1,5 +1,12 @@
namespace Pokemon using System;
using Pokedex;
namespace Pokemon
{ {
// 1/3 Planning
// 1/6 Coding
// 1/4 component test and early system test
// 1/4 system test, all components in hand
// - "The Mythical Man Month" by Frederick P. Brooks
class Program class Program
{ {
static void Main(string[] args) static void Main(string[] args)

View file

@ -1,4 +1,4 @@
namespace Pokemon; namespace Pokedex;
public class Pikachu public class Pikachu
{ {