Неприятности с базой и утилизацией
Мне нужна помощь вот мой код
using System; using System.Windows.Forms; namespace WindowsFormsApplication5 { partial class LBIndustrialCtrlsBase { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; public AutoScaleMode AutoScaleMode { get; private set; } /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } IDisposable disposable = base as IDisposable; CS0175 here if (disposable != null) { disposable.Dispose(disposing); CS1501 here } } #region Component Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { components = new System.ComponentModel.Container(); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; } #endregion } }
Я постоянно получаю следующую ошибку
CS0175 C# Use of keyword 'base' is not valid in this contextи
CS1501 C# No overload for method 'Dispose' takes 1 arguments
любая помощь будет оценена по достоинству так что пожалуйста продолжайте
Что я уже пробовал:
Я пробовал различные решения из других источников, чтобы исправить другие проблемы, которые у меня были с dispose, и это все, что я получил в устранении этой проблемы
F-ES Sitecore
"база" - это когда ваш класс наследует другой класс, а ваш-нет.
Member 13525065
хорошо, я взял базу как IDisposable, и теперь я получаю CS0165 C# использование неназначенной локальной переменной. Я знаю, как работают поля из практики basic, но теперь мне нужно применить его к этой ситуации