コード例 #1
0
        /// <summary>
        /// Creates a copy of the image.
        /// </summary>
        /// <returns>Returns the copy.</returns>
        public EncyclopediaImage Copy()
        {
            EncyclopediaImage ei = new EncyclopediaImage();

            ei.ID    = fID;
            ei.Name  = fName;
            ei.Image = fImage;

            return(ei);
        }
コード例 #2
0
        public EncyclopediaImage Copy()
        {
            EncyclopediaImage encyclopediaImage = new EncyclopediaImage()
            {
                ID    = this.fID,
                Name  = this.fName,
                Image = this.fImage
            };

            return(encyclopediaImage);
        }
コード例 #3
0
        public EncyclopediaImage FindImage(Guid id)
        {
            EncyclopediaImage encyclopediaImage;

            List <EncyclopediaImage> .Enumerator enumerator = this.fImages.GetEnumerator();
            try
            {
                while (enumerator.MoveNext())
                {
                    EncyclopediaImage current = enumerator.Current;
                    if (current.ID != id)
                    {
                        continue;
                    }
                    encyclopediaImage = current;
                    return(encyclopediaImage);
                }
                return(null);
            }
            finally
            {
                ((IDisposable)enumerator).Dispose();
            }
        }