Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
R

rex64

@rex64
About
Posts
1
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • ItemObservableCollection
    R rex64

    I have an ItemObservableCollection called _MyChildren with a collection of clsChild. I am trying to get nonfictions when a clsChild.name string is changed. Error I am getting on MyChildren.ItemPropertyChanged:

    Severity Code Description Project File Line Suppression State
    Error CS1661 Cannot convert anonymous method to type 'EventHandler>' because the parameter types do not match the delegate parameter types C-Sharp-Tests C:\Users\Jeff\Documents\GitHub\C-Sharp-Tests\C-Sharp-Tests\C-Sharp-Tests\clsParent.cs 21 Active

    clsParent:

    using Countdown;
    using System;
    using System.Collections.Generic;
    using System.Collections.ObjectModel;
    using System.ComponentModel;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;

    namespace C_Sharp_Tests
    {
    internal class clsParent : INotifyPropertyChanged
    {
    public event PropertyChangedEventHandler PropertyChanged;

        private ItemObservableCollection \_MyChildren;
    
        public clsParent()
        {
            \_MyChildren = new ItemObservableCollection();
            this.\_MyChildren.ItemPropertyChanged += delegate (object sender, PropertyChangedEventArgs e)
            {
                if (string.Equals("IsChanged", e.PropertyName, StringComparison.Ordinal))
                {
                    this.RaisePropertyChanged("IsChanged");
                }
            };
        }
    }
    

    }

    clsChild:

    using System;
    using System.Collections.Generic;
    using System.Collections.ObjectModel;
    using System.ComponentModel;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;

    namespace C_Sharp_Tests
    {
    internal class clsChild : INotifyPropertyChanged
    {

        public event PropertyChangedEventHandler PropertyChanged;
    
        public string name { get; set; }
    
    
    }
    

    }

    ItemObservableCollection:

    using System;
    using System.Collections.Generic;
    using System.Collections.ObjectModel;
    using System.ComponentModel;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;

    namespace Countdown
    {
    /// /// You can use it like this:
    /// var orders = new ItemObservableCollection();
    /// orders.CollectionChanged += OnOrdersChanged;
    /// orders.ItemPropertyChanged += OnOrderChanged;
    ///
    /// The type
    public sealed class ItemObservableCollection

    C# csharp linq regex help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups