Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Runtime.InteropServices;
- using System.Text;
- using System.Threading.Tasks;
- namespace kurs_aisd1
- {
- class Program
- {
- public const string CppFunctionDll = @"C:\Users\Анастасия\source\repos\Алгоритм_сортировки\Debug\Алгоритм_сортировки.dll";
- [DllImport(CppFunctionDll, CallingConvention = CallingConvention.Cdecl)]
- public static extern void Sort(string[] Line, int n);
- [STAThread]
- static void Main(string[] args)
- {
- //string FN = null;
- //System.Windows.Forms.OpenFileDialog dlg = new System.Windows.Forms.OpenFileDialog();
- //if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
- // FN = dlg.FileName;
- //if (FN == null)
- // return;
- //using (StreamReader streamReader = new StreamReader(FN))
- //{
- // string tLine = null;
- // while ((tLine = streamReader.ReadLine()) != null)
- // {
- // //string[] Line = tLine.Split(';'); <----- здесь
- // }
- //}
- string[] Line = { //Надо массив загрузить из файла строка + сплит
- "ACD", "ABD", "Zdsad","BAF", "BAA", "FDG"
- };
- Console.WriteLine("До сортировки:");
- //StreamWriter sw = new StreamWriter(path);
- foreach (var item in Line)
- {
- Console.WriteLine(item);
- // sw.Write(item + " ");
- }
- Sort(Line, Line.Length);
- //foreach (var item in Line)
- //{
- // Console.WriteLine(item);
- // // sw.Write(item + " ");
- //}
- //Console.WriteLine($"{Sum(6,2)}");
- //Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement