Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- namespace ConsoleApplication1
- {
- class Row
- {
- public byte line;
- public List<char> str;
- public Row(IEnumerable<char> str)
- {
- this.str = str.ToList();
- }
- public Row()
- {
- }
- public int GetLenght()
- {
- return str.Count();
- }
- public void Clear()
- {
- str.Clear();
- }
- }
- internal class Program
- {
- public static void Main(string[] args)
- {
- var row = new Row("Всем привет эта новая рубрика МЦК-КТИТС".ToCharArray());
- //row.Clear();//для удаления
- Console.WriteLine($"Длина строки: {row.GetLenght()}");
- Console.ReadKey();
- ;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement