- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What are predefined attributes in C#?
The following are the predefined attributes in C# −
The pre-defined attribute AttributeUsage describes how a custom attribute class can be used. Here is the syntax −
[AttributeUsage ( validon, AllowMultiple = allowmultiple, Inherited = inherited )]
This predefined attribute marks a conditional method whose execution depends on a specified preprocessing identifier. It causes conditional compilation of method calls, depending on the specified value such as Debug or Trace.
The following is the syntax −
[Conditional( conditionalSymbol )]
This predefined attribute marks a program entity that should not be used. It enables you to inform the compiler to discard a particular target element. Here is the syntax −
[Obsolete ( message )] [Obsolete ( message, iserror )]
- What are the predefined functions in C language?
- What are Python function attributes?
- What are conditional attributes in C#?
- What are obsolete attributes in C#?
- What are the attributes in C#?
- What are event attributes in jQuery?
- What are the DataTransfer object attributes?
- What are built-in class attributes in Python?
- What is a predefined package in Java?
- What are the methods in jQuery to manipulate attributes?
- What are various attributes Of page directive in JSP?
- PHP Predefined Variables
- What are the attributes of a file object in Python?
- What are the attributes of programming languages in compiler design?
- What are the attributes of a Perfect Capital Market?