Skip to content

Instantly share code, notes, and snippets.

@yanisurbis
Created August 7, 2015 11:26
Show Gist options
  • Save yanisurbis/0d98244b483a25a07443 to your computer and use it in GitHub Desktop.
Save yanisurbis/0d98244b483a25a07443 to your computer and use it in GitHub Desktop.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Data;
namespace ConsoleApplication2
{
struct MyStruct
{
public int myInt;
public double myDouble;
public string myString;
public MyStruct(int myInt, double myDouble, string myString)
{
this.myInt = myInt;
this.myDouble = myDouble;
this.myString = myString;
}
}
class Program
{
static void Main(string[] args)
{
MyStruct[] a = new MyStruct[]
{
new MyStruct(1, 1.0, "one"),
new MyStruct(2, 2.0, "two"),
new MyStruct(3, 3.0, "three"),
new MyStruct(4, 4.0, "four"),
new MyStruct(5, 5.0, "five"),
new MyStruct(6, 6.0, "six"),
new MyStruct(7, 7.0, "seven"),
new MyStruct(8, 8.0, "eight")
};
// Получить массив объектов, содержащих только целое число и строковое представление числа,
// до числа 6 (i < 6) и отсортированный в обратном порядке.
ReadLine();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment