39 lines
1.0 KiB
C#
39 lines
1.0 KiB
C#
using System.Drawing;
|
|
|
|
namespace ConsoleApp8
|
|
{
|
|
internal class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
List<string> favoriColor = new List<string>()
|
|
{ "Синий", "Красный", "Черный", "Фиолетовый", "Зеленый"};
|
|
Console.WriteLine("Любимый цвет");
|
|
foreach (string color in favoriColor)
|
|
{
|
|
Console.WriteLine(color);
|
|
}
|
|
favoriColor[3] = "Голубой";
|
|
|
|
string[] fav_colors = { "Синий", "Красный", "Черный", "Фиолетовый", "Зеленый" };
|
|
Console.WriteLine(String.Join(", ", fav_colors));
|
|
fav_colors[2] = "red";
|
|
Console.WriteLine(String.Join(", ", fav_colors));
|
|
|
|
int[] ints = { 2, 3, 4 };
|
|
for (int i = 0; i < ints.Length; i++)
|
|
{
|
|
ints[i] = ints[i];
|
|
}
|
|
|
|
Console.WriteLine(String.Join(", ", ints));
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|