小编Dav*_*ano的帖子

为什么当我调用这个 hashset 的 remove 操作时,它既不使用 gethashcode 也不使用等式实现?

我正在做一个应用程序来管理角色扮演会话的创建,但是我在做规则摘要的部分有问题,所以大师不必每秒钟都阅读核心书,我有这种方式的数据结构。

用户有一个战役列表,该战役有一个场景列表,场景有一个冒险列表。

用户 -> Lcampaings -> Lscenaries -> Ladventures

每个活动、场景或冒险都有资源,其中包含文档、图像、资源等列表以及摘要的散列集。

战役/场景/冒险 -> 资源 -> Ldocuments/LImages/.../HashSet 摘要

好的,所以为了修改我已经实现的等式和 gethashcode 的摘要

using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Text;
using System.Windows;

namespace ElEscribaDelDJ.Classes
{
    public class Resumenes: INotifyPropertyChanged, IEqualityComparer<Resumenes>
    {

        private string _nombre;

        public string Nombre
        {
            get { return _nombre; }
            set { 
                _nombre = value;
                OnPropertyChanged("Nombre");
            }
        }

        private string _etiquetas;

        public string Etiquetas
        {
            get { return _etiquetas; }
            set { 
                _etiquetas = value;
                OnPropertyChanged("Etiquetas"); …
Run Code Online (Sandbox Code Playgroud)

c# hashset iequalitycomparer

0
推荐指数
1
解决办法
50
查看次数

标签 统计

c# ×1

hashset ×1

iequalitycomparer ×1