I got a error: "CS8370	Компонент "рекурсивные шаблоны" недоступен в C# 7.3. Используйте версию языка 8.0 или выше."

Code:

using ModBusHelper;
using NModbus;
using System;
using System.Collections.Generic;
using System.Data;
using System.Net.Sockets;
using System.Windows.Forms;

namespace Configurator
{
    public partial class JournalRecordForm : Form
    {
        ModBusCommands CommandsHelper = new ModBusCommands();
        ModBusFunctions ModbusFunctionsHelper = new ModBusFunctions();
        ModBusExporterLinker ExporterLinkerHelper = new ModBusExporterLinker();
        ModBusProfile ProfileHelper = new ModBusProfile();

        private CommanderForm CommanderForm;
        private Tuple<TcpClient, IModbusMaster> _connection;

        DataTable JournalRecordsDataTable = new DataTable();
        DataTable JournalRecordDataTable = new DataTable();

        public JournalRecordForm(CommanderForm CommanderFormInstance, List<ModBusProfile.journal_record> Filtered_Journal_Records)
        {
            InitializeComponent();
            this.CommanderForm = CommanderFormInstance;

            // Subscribe to connection events
            CommanderForm.ConnectionStarted += OnConnectionStarted;
            CommanderForm.ConnectionStopped += OnConnectionStopped;

            JournalRecordDataTableInitialization();
            JournalRecordsDataTableInitialization(Filtered_Journal_Records);
            JournalRecordsDataGridView.SelectionChanged += JournalRecordsDataGridView_SelectionChanged;
        }

        private void OnConnectionStarted(Tuple<TcpClient, IModbusMaster> connection)
        {
            _connection = connection;
            // Refresh journal entries when connection is available
            UpdateJournalEntries();
        }

        private void OnConnectionStopped()
        {
            // Handle actions when connection stops, if needed
            MessageBox.Show("Соединение разорвано, журналы могут быть неактуальны.", "Информация", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }

        private void UpdateJournalEntries()
        {
            try
            {
                Database.Journal_Record = ProfileHelper.journal_record_Read(_connection.Item2);

                int RecordCounter = 0;
                foreach (ModBusProfile.journal_record record in Database.Journal_Record)
                {
                    if (record.hdr.rtype == 0)
                    {
                        continue;
                    }

                    if (record.hdr.rtype == 1)
                    {
                        if (record.hdr.subtype == 0)
                        {
                            JournalRecordsDataTable.Rows.Add(new object[] { RecordCounter, "Отключение выключателя", UnixTimeStampToDateTime((record.hdr.stamp.slo + (record.hdr.stamp.ns * 0.000000001))) });
                        }
                        else if (record.hdr.subtype == 1)
                        {
                            JournalRecordsDataTable.Rows.Add(new object[] { RecordCounter, "Включение выключателя", UnixTimeStampToDateTime((record.hdr.stamp.slo + (record.hdr.stamp.ns * 0.000000001))) });
                        }
                        Database.Filtered_Journal_Records.Add(record);
                        RecordCounter++;
                    }
                    else if (record.hdr.rtype == 2)
                    {
                        JournalRecordsDataTable.Rows.Add(new object[] { RecordCounter, "Обнуление счетчика ресурса", UnixTimeStampToDateTime((record.hdr.stamp.slo + (record.hdr.stamp.ns * 0.000000001))) });
                        Database.Filtered_Journal_Records.Add(record);
                        RecordCounter++;
                    }
                }

                JournalRecordsDataGridView.DataSource = JournalRecordsDataTable;
            }
            catch (Exception modbusEx)
            {
                MessageBox.Show($"Ошибка получения записей журнала СКРВ: {modbusEx.Message}", "Ошибка ModBus соединения", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
        }

        private void JournalRecordsDataTableInitialization(List<ModBusProfile.journal_record> Filtered_Journal_Records)
        {
            JournalRecordsDataTable.Columns.Add("Номер записи", typeof(int));
            JournalRecordsDataTable.Columns.Add("Событие", typeof(string));
            JournalRecordsDataTable.Columns.Add("Дата", typeof(DateTime));

            foreach (DataColumn Column in JournalRecordsDataTable.Columns)
            {
                Column.ReadOnly = true;
            }

            int RecordCounter = 0;
            foreach (ModBusProfile.journal_record record in Filtered_Journal_Records)
            {
                if (record.hdr.rtype == 0) continue;

                string eventType = record.hdr.subtype switch
                {
                    0 => "Отключение выключателя",
                    1 => "Включение выключателя",
                    _ => "Неизвестный тип"
                };

                if (record.hdr.rtype == 1 || record.hdr.rtype == 2)
                {
                    JournalRecordsDataTable.Rows.Add(new object[] { RecordCounter, eventType, UnixTimeStampToDateTime(record.hdr.stamp.ns) });
                    RecordCounter++;
                }
            }

            JournalRecordsDataGridView.DataSource = JournalRecordsDataTable;
        }

        private void JournalRecordDataTableInitialization()
        {
            List<ModBusProfile.journal_record> journal_record = ExporterLinkerHelper.journal_record_Default;

            JournalRecordDataTable.Columns.Add("Канал", typeof(int));
            JournalRecordDataTable.Columns.Add("Накопленное значение расхода ресурса (%)", typeof(float));
            JournalRecordDataTable.Columns.Add("Количество отключений", typeof(ushort));
            JournalRecordDataTable.Columns.Add("Количество включений", typeof(ushort));
            JournalRecordDataTable.Rows.Add(new object[] { 0, journal_record[0].rcntv[0].Racc, journal_record[0].rcntv[0].ofcnt, journal_record[0].rcntv[0].oNacnt });
            rcntvDataGridView.DataSource = JournalRecordDataTable;
        }

        private void JournalRecordsDataGridView_SelectionChanged(object sender, EventArgs e)
        {
            ShowJournalRecordInformation();
        }

        private void ShowJournalRecordInformation()
        {
            if (JournalRecordsDataGridView.CurrentRow == null) return;

            int selectedRecordNumber = JournalRecordsDataGridView.CurrentRow.Index;
            if (selectedRecordNumber >= 0 && selectedRecordNumber < Database.Filtered_Journal_Records.Count)
            {
                ModBusProfile.journal_record SelectedRecord = Database.Filtered_Journal_Records[selectedRecordNumber];

                EventTypeTextBox.Text = SelectedRecord.hdr.subtype switch
                {
                    0 => "Отключение выключателя",
                    1 => "Включение выключателя",
                    _ => "Обнуление счетчика ресурса"
                };

                SloTextBox.Text = SelectedRecord.hdr.stamp.slo.ToString();
                NsTextBox.Text = SelectedRecord.hdr.stamp.ns.ToString();
                UdtTextBox.Text = SelectedRecord.hdr.udt.ToString();
                IiTextBox.Text = SelectedRecord.Ii.ToString();
                RiTextBox.Text = SelectedRecord.Ri.ToString();

                for (int z = 0; z < SelectedRecord.rcntv.Length && z < JournalRecordDataTable.Rows.Count; z++)
                {
                    JournalRecordDataTable.Rows[z][1] = SelectedRecord.rcntv[z].Racc;
                    JournalRecordDataTable.Rows[z][2] = SelectedRecord.rcntv[z].ofcnt;
                    JournalRecordDataTable.Rows[z][3] = SelectedRecord.rcntv[z].oNacnt;
                }

                rcntvDataGridView.DataSource = JournalRecordDataTable;
            }
        }

        private void JournalRecordForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            CommanderForm.ConnectionStarted -= OnConnectionStarted;
            CommanderForm.ConnectionStopped -= OnConnectionStopped;
        }

        public static DateTime UnixTimeStampToDateTime(double unixTimeStamp)
        {
            DateTime dateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc);
            dateTime = dateTime.AddSeconds(unixTimeStamp).ToLocalTime();
            return dateTime;
        }
    }
}