DataGridViewColumnDesignTimeVisibleAttribute.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / DataGridViewColumnDesignTimeVisibleAttribute.cs / 1305376 / DataGridViewColumnDesignTimeVisibleAttribute.cs

                            //------------------------------------------------------------------------------ 
// 
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//----------------------------------------------------------------------------- 

namespace System.Windows.Forms { 
using System.Diagnostics.CodeAnalysis; 

    ///  
    [AttributeUsage(AttributeTargets.Class)]
    public sealed class DataGridViewColumnDesignTimeVisibleAttribute: Attribute {
        private bool visible;
 
        /// 
        public DataGridViewColumnDesignTimeVisibleAttribute (bool visible) { 
            this.visible = visible; 
        }
 
        /// 
        public DataGridViewColumnDesignTimeVisibleAttribute () {
        }
 
        /// 
        public bool Visible { 
            get { 
                return visible;
            } 
        }

        /// 
        [ 
            SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")   // DataGridViewColumnDesignTimeVisibleAttribute
                                                                                                        // actually immutable. 
        ] 
        public static readonly DataGridViewColumnDesignTimeVisibleAttribute Yes = new DataGridViewColumnDesignTimeVisibleAttribute(true);
 
        /// 
        [
            SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")   // DataGridViewColumnDesignTimeVisibleAttribute
                                                                                                        // actually immutable. 
        ]
        public static readonly DataGridViewColumnDesignTimeVisibleAttribute No = new DataGridViewColumnDesignTimeVisibleAttribute(false); 
 
        /// 
        [ 
            SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")   // DataGridViewColumnDesignTimeVisibleAttribute
                                                                                                        // actually immutable.
        ]
        public static readonly DataGridViewColumnDesignTimeVisibleAttribute Default = Yes; 

        ///  
        public override bool Equals(object obj) { 
            if (obj == this) {
                return true; 
            }

            DataGridViewColumnDesignTimeVisibleAttribute other = obj as DataGridViewColumnDesignTimeVisibleAttribute;
            return other != null && other.Visible == visible; 
        }
 
        ///  
        public override int GetHashCode() {
            return typeof(DataGridViewColumnDesignTimeVisibleAttribute).GetHashCode() ^ (visible ? -1 : 0); 
        }

        /// 
        public override bool IsDefaultAttribute() { 
            return (this.Visible == Default.Visible);
        } 
    } 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------ 
// 
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//----------------------------------------------------------------------------- 

namespace System.Windows.Forms { 
using System.Diagnostics.CodeAnalysis; 

    ///  
    [AttributeUsage(AttributeTargets.Class)]
    public sealed class DataGridViewColumnDesignTimeVisibleAttribute: Attribute {
        private bool visible;
 
        /// 
        public DataGridViewColumnDesignTimeVisibleAttribute (bool visible) { 
            this.visible = visible; 
        }
 
        /// 
        public DataGridViewColumnDesignTimeVisibleAttribute () {
        }
 
        /// 
        public bool Visible { 
            get { 
                return visible;
            } 
        }

        /// 
        [ 
            SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")   // DataGridViewColumnDesignTimeVisibleAttribute
                                                                                                        // actually immutable. 
        ] 
        public static readonly DataGridViewColumnDesignTimeVisibleAttribute Yes = new DataGridViewColumnDesignTimeVisibleAttribute(true);
 
        /// 
        [
            SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")   // DataGridViewColumnDesignTimeVisibleAttribute
                                                                                                        // actually immutable. 
        ]
        public static readonly DataGridViewColumnDesignTimeVisibleAttribute No = new DataGridViewColumnDesignTimeVisibleAttribute(false); 
 
        /// 
        [ 
            SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")   // DataGridViewColumnDesignTimeVisibleAttribute
                                                                                                        // actually immutable.
        ]
        public static readonly DataGridViewColumnDesignTimeVisibleAttribute Default = Yes; 

        ///  
        public override bool Equals(object obj) { 
            if (obj == this) {
                return true; 
            }

            DataGridViewColumnDesignTimeVisibleAttribute other = obj as DataGridViewColumnDesignTimeVisibleAttribute;
            return other != null && other.Visible == visible; 
        }
 
        ///  
        public override int GetHashCode() {
            return typeof(DataGridViewColumnDesignTimeVisibleAttribute).GetHashCode() ^ (visible ? -1 : 0); 
        }

        /// 
        public override bool IsDefaultAttribute() { 
            return (this.Visible == Default.Visible);
        } 
    } 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK