C# Corner

Resources  
  • Creating and Using Custom Attributes in C#Feb 27, 2000. Attributes are classes that allow you to add additional information to elements of your class structure.
  • Ouch! There is a Hook in My C#May 15, 2001. As an extension to the J++ design practice, C# has a syntactic construct, called Attributes, which let you drop hooks to Windows API or modify the runtime semantics, like threading synchronization behavior. The C# has legalized the hooking practice by calling them Attributes, and including them in ECMA C# specification.
  • Using Attributes in C#Sep 14, 2001. This article shows how to create custom attribute classes, use them in code, and query them.
  • Mapping Objects to Relational DatabasesNov 01, 2001. The application generates C# Class files for each table in a relational database. I have used Mysql and ODBC.NET for this project. The application only supports MySQL right now.
  • Application Data Utility ClassApr 24, 2002. Attached is a ZIP file containing the source-code and compiled DLL of the "Application Data Utility Class".
  • Case Study: Demo Networking Financial System May 23, 2002. In this tutorial I will discuss some of the design and development issues that one might consider when using .NET framework for developing Network affiliated applications.
  • Robotics Game Using .NET LanguagesMay 28, 2002. It is often not easy to get to know new technologies like .NET if you don’t get introduced to in a work environment.
  • C# Style-SheetMay 31, 2002. This article contains a C# style-sheet for the GNU a2ps print utility. The style-sheet keywords, comments, preprocessor directives, and [] style attributes are pretty-printed in the typical a2ps fonts.
  • Using Active DirectoryJul 31, 2002. This sample code can sense current context in Active Directory, checks for the existence of attributes, provides a list of all the attributes in Active Directory and can add a user to Active Directory.
  • Calling Procedural COBOL from C#Sep 05, 2002. In a previous article we discussed how to call procedural based COBOL programs from VB.NET.
  • Attributed Programming in .NET using C#Oct 04, 2002. In this article, I illustrate the power of attributed programming by examples that show a modular approach to issues that can crosscut many classes. Attributes will provide exciting software development abstractions in the future.
  • Invoking Unmanaged DLL Functions from Compact Framework for Pocket PC Jan 04, 2003. In this example we will use the Compact Framework to create a program containing a launch pad for the Pocket PC.
  • An XML-RPC Package for .NETFeb 06, 2003. This package provides a simple XML-RPC client and server for C# applications. It's pure C#, using .Net for networking and XML functionality.
  • Using C# and COM Interoperability to Extract from a UML tool into a Microsoft Word DocumentFeb 18, 2003. This article allows you to read the classes contained inside of WithClass 2000 into a Word Document using COM Interoperability for Word and COM Interoperability for WithClass and presents your classes in a kind of report.
  • Querying COM+ through Web ServicesMar 12, 2003. The most COM+ common administrative tasks (creating a COM+ application, installing/deleting a component, setting a component attribute) can be accomplished manually with the Component Services administrative tool from Management Console.
  • Coloring the Console in C# Oct 25, 2004. When working with console applications in C#, you always see a black and white screen. What if we want to change the background color of the console? We can change the foreground and background color of our console application by using win32 API SetConsoleTextAttribute().
  • Moving C Structures into .NET with Custom MarshalingDec 17, 2004. Microsoft provides several attributes for marshaling C to C#. In our example we will take the case where we have hundreds of structures and only a few API calls, so we only need to generate the marshaled code for the structures.
  • Performance Improvement in ASP.NET Using CachingFeb 01, 2005. ASP.NET provides caching at several levels for you to leverage and improve the responsiveness of your application by storing the page output or application data across HTTP requests and reuse it. This allows the web server to take advantage of processing the request without recreating the information and thus saving time and resources.
  • Posting to another .aspx using ASP.NET Mar 19, 2005. ASP.NET wont allow to post back to another aspx page. It will post back to itself. If you specify action attribute it will ignore it. If you omit the method attribute, it will be set to method="post" by default.
  • Comparing Conditional Attributes in C/C++ versus C#Apr 09, 2005. This article compares conditional attibuting in C/C++ and C#.
  • Attributes in C#Feb 20, 2006. In this artilcle, we will see what the attributes are and why should we use the attributes in our applications?
  • Assembly Viewer and Assembly Conflict Viewer in ASP.NETAug 10, 2006. This article show how to view assembly attributes and conflicts in ASP.NET page using C#.
  • Flash Player Custom Control for ASP.NET 2.0Dec 05, 2006. This article describes a quick and simple approach to creating a custom web control used to display shockwave flash files within an ASP.NET page. Whilst the article and demonstration project are focused upon displaying a shockwave flash (SWF) file, the basic idea is applicable to any sort of object that you may wish to embed within an ASP.NET 2.0 page.
  • Extending the ASP.NET ImageButton ControlDec 18, 2006. This article describes an easy approach to extending an existing ASP.NET control; in this example, the standard toolkit’s Image Button control is extended to support roll-over effects. Given the standard control already contains existing support for both server side click events and client click events, the control is well furbished prior to the addition of the roll-over effect.
  • ASP.NET 2.0 Visio Custom ControlJan 15, 2007. This article describes a quick and simple approach to creating a custom web control used to display Microsoft Visio files within an ASP.NET page using Internet Explorer.
  • Extending ASPX Panel Control to produce Rounded CornersMar 05, 2007. This article shows how to create a custom control which encapsulates scripts. Also shows how to add method attributes to interact with VS Designer and ToolBox as well as providing intellisense dropdowns.
  • Generate SQL Statements With Objects, Attributes and ReflectionJun 12, 2007. Create a SQL Command with SQL Statement and Parameters dynamically.
  • Read Asp.net Request Param and Session dynamically into propertiesOct 04, 2007. This Article shows how you can use Attributes and Reflection to dynamically populate property with value from param, session or context without writing any addition code. I have used this technique in past and I hope you will also find it useful.
  • Configuration Sections; Introducing the Custom Configuration Section Concept: Part IApr 14, 2008. Custom sections of an ASP.NET Configuration File are customized sections that a developer configures by himself. In this case, the developer also sets their attributes and elements to suit special application needs in terms of settings.
  • Configuration Sections- Create a configuration section group and retrieve configuration information from it: Part IVApr 18, 2008. In the previous article , we demonstrate how to create a custom section with custom attributes using the ConfigurationSection class and IConfigurationSectionHandler interface.
  • Access AssemblyInfo File and Get Product InformationsApr 22, 2008. This article tells you that .Net have the assemblyInfo file for every project and also have custom attributes to access the asseblyinfo file attributes.
  • Handle resource files - Generate a class with strong typed properties using StronglyTypedResourceBuilder: Part VIISep 03, 2008. You can generate a class with strongly typed properties issued from a given resources file elements or attributes using other way than in Part VI handle resource files where the resgen.exe is invoked to achieve such task.
  • Introduction to Enterprise Library: Part IIJan 19, 2009. This article explains Attribute based validation in a Validation Application Block.
  • Introduction to Enterprise Library: Part IIIJan 21, 2009. This article explains about Attribute based Validators and Rule sets of Validation Application Block.
  • Aspect Oriented Programming in C#.NET: Part IIFeb 19, 2009. This article is the continuation of the Part I. We will continue with the same problem of the Customer Sales application discussed in Part I.
  • Parsing Markup to represent it as ObjectsApr 01, 2009. Here I place a project I made that takes any markup and turn it in form of a MarkupDocument with elements and attributes, content etc.
  • Setting Null Value to an Entity Property Through Textbox ControlMay 12, 2009. In this article, I want to document a bug in Visual Studio. NET concerning to setting a null value to entity property’s through a Textbox control. There is a common scenario to have an entity type in your data model where some attributes are optional. When you develop a rich client application using the Windows forms, data binding techniques and a Textbox to enter the simple data, and you want to set null the optional attributes of the underlying data source by leaving in blank the Text property of the Textbox control; then there is a missing feature for the Formatting and Advanced Binding dialog box for null values. They should have a checkbox there to allow people to use blank as null. In this article, I will show one simple solution to this bug.
  • MVC Declarative BindingJun 08, 2009. One of the things that makes the bar to implement any “MVC-ish” pattern high is the tremendous amount of plumbing required just to get started in order for the different entities to communicate state changes. This article introduces a utility library that can be used to declaratively bind the model and view encapsulating all the wiring required and making implementation much easier.
  • Data Contract Hierarchy in WCFJul 10, 2009. This article will explain : Data Contract hierarchy,How base class and sub class are getting exposed in WCF?,What is Known Type attribute and Mixing of sterilization and DataContract
  • What is the AutoEventWireup attribute in ASP.NETSep 07, 2009. In this article I will explain about AutoEventWireup attribute in ASP.NET
  • Client execution from server controlsSep 09, 2009. In this article I will expalin how to execute client script from server controls.
  • XML OverviewNov 14, 2009. In this article I will explain XML and how to write an XML code.
  • XML NamespacesNov 18, 2009. In this article I will explain you about XML namespace, DTD and schemas and Extensible Hyper Text Markup Language.
  • An XML Document and its ItemsNov 19, 2009. In this article I will explain you about XML Document and its Items.
  • Reading XML Documents using C#Nov 23, 2009. In this article I will explain you how to read an XML document in C#.
  • Attributes in C#Nov 24, 2009. In this article I will explain about attributes in C#.
  • Attribute or Styles in GDI+ Dec 21, 2009. In this article I will explain about Attribute or Styles in GDI+.
  • Debugging and Tracing in C# Feb 04, 2010. In this article I will explain you about the Debugging and Tracing in C#.
  • Transparent Brushes in WPFFeb 21, 2010. All elements in XAML including all brushes have an Opacity attribute that defines the transparency of an element. This article demonstrates how to use Opacity to implement transparent brushes in WPF using XAML.
  • LINQ to XML Part 1 - XAttribute ClassFeb 21, 2010. In this article, I will give explanation on XAttribute class. This class is used to construct Attributes in XML Elements.
  • Image Attributes and the ImageAttributes Class in GDI+ Mar 11, 2010. In this article I will explain about Image Attributes and the ImageAttributes Class in GDI+.
  • LevelFinal and Exclusive Attributes in C# Mar 16, 2010. In this article I will explain you about LevelFinal and Exclusive Attributes in C# .
  • Implementing an IComparable interface to a ClassMar 31, 2010. Here I have given an example of how to sort an Person class on the basis of its attribute by implementing IComparable interface.
  • CollectionDataContract Attribute in WCFAug 03, 2010. In this article, I will explain you what is CollectionDataContract Attribute in WCF and why need it?
  • Div and Web DesignAug 27, 2010. If you develop web applications then surely you know about the Div <div> tag but many of you guys never have a usuful look on it. As i know div tag is the backbone of a consistent css used website. Basically div is a section you can say which separate the sections in a webpage. But div not only separate the contents but it also provides the different formating for each section.
  • Create Restful WCF Service APIAug 30, 2010. In this article I am going to explain you how to implement restful service API using WCF 4.0 . The Created API returns XML and JSON data using WCF attribute.
  • Reflection and Attributes in C#Sep 03, 2010. Attributes are attached to program entities such as types and methods to provide information about the entity at runtime. In this article, we will explore attributes using reflection in C#.
  • IgnoreDataMember Attribute in WCF POCO SerializationSep 29, 2010. In this article we will see about IgnoreDataMember attribute in WCF POCO Serialization.
  • Working with Silverlight and XNA windows phone 7 application OrientationNov 17, 2010. When you run the SilverlightHelloPhone program, and you turn the phone or emulator sideways, you'll discover that the display doesn't change to accommodate the new orientation, To fix that problem you have to make change in the root PhoneApplicationPage tag, of MainPage.xaml change the attribute.
  • Reading XML Attributes using LINQ to XML in Silverlight Nov 29, 2010. This code snippet demonstrates how to load an XML file and reads its nodes and their attributes in a Silverlight application using LINQ to XML.
  • Working with Attributes and Resources of XAML in Windows Phone 7 Nov 30, 2010. Many classes that you use in XAML have something called a ContentProperty attribute. This word “attribute” has different meanings in .NET and XML; here I’m talking about the .NET attribute, which refers to some additional information that is associated with a class or a member of that class.
  • Basics of DataContractDec 08, 2010. DataContract is under namespace System.Runtime.Serialization. During design time, DataContract Attribute is used to indicate which class should be represented as XSD.
  • Using reflection and attributesDec 12, 2010. Reflection provides objects (of type Type) that encapsulate assemblies, modules and types. You can use reflection to dynamically create an instance of a type, bind the type to an existing object, or get the type from an existing object and invoke its methods or access its fields and properties.
  • How to Read / Search Node or Attribute in XML fileDec 21, 2010. In this article you will learn how to Read / Search Node or Attribute in XML file.
  • XMLDocument (DOM) and XDocument (LINQ)Jan 20, 2011. Before LINQ to XML we were used XMLDocument for manipulations in XML like adding attributes, elements and so on. Now LINQ to XML uses XDocument for the same kind of thing. Syntaxes are much easier than XMLDocument and it requires a minimal amount of code.
  • Image Filters using HTMLJan 28, 2011. Filters give a great variety of visual effects in web pages dynamically. We will see different types of filters in this article.
  • Generalized Class for TombstoneFeb 02, 2011. This is the simplest way for handling the Tombstone using Reflection and Custom attributes. We can use this code for tombstoning your application.
  • How to resolve the error “Cannot change hidden attribute for this field”Feb 17, 2011. In this article we will be seeing how to resolve the following error “Cannot change hidden attribute for this field”.
  • Web Farm - Simple OverviewMar 25, 2011. In this article we are going to discuss a simple overview of the Web Farm and its advantages.
  • Calling Unmanaged Functions Which Take a Variable Number of Arguments From C#Mar 29, 2011. Many C# programmers are familiar with the Platform Invoke mechanism (using the DllImport attribute) for calling unmanaged functions from C#.
  • Filter Search in JQ Grid Using Jquery in ASP.NET ApplicationMay 11, 2011. In this article I will describe how to do a filter search by comparing two given attributes in another window.
  • Maintaining Scrollbars in Document Editing ApplicationsMay 15, 2011. When coding a document editing application, maintaining scrollbars is a task that must be done correctly to have an accurate and responsive document viewer. This article gives precise instructions how to calculate values of different scrollbar attributes so that scrolling functionality is coded correctly.
  • Attributes in C#Jun 08, 2011. In this series we will see the usage of “Attribute” with the help of some examples and creation of our own custom attributes to be used in a sample use case.
  • Creating a Custom Markup Extension in WPFJul 08, 2011. Custom Markup Extension enables you to extend XAML and set any property that can be set in XAML using attribute syntax.
  • Use DataList Tag as Drop Down List in HTML5Jul 26, 2011. The Datalist tag represent a list of options that represent predefined options for other controls. A DataList is not visible to the user, but it is associated with the input tag through the input tag list attribute.
  • MEF Features .NET 4.0Jul 28, 2011. In this article I am explaining some of the useful features MEF provides.
  • Next Generation of HTML - HTML5Aug 16, 2011. In this article you will see Brief description of HTML5.
  • Button Tag in HTML5Aug 19, 2011. Here, you will see the use of button tag in html5.
  • HTML5 anchor Tag Aug 22, 2011. The a tag defines an anchor. The HTML a tag is used for creating a hyperlink to another web page.
  • HTML5 Header and Footer TagAug 25, 2011. In this article, you will see the use of header and footer tag of HTML5.
  • Mark Tag in HTML5Aug 26, 2011. The mark tag was introduced in HTML 5. The HTML mark tag is used for indicating text as marked or highlighted for reference purposes, due to its relevance in another context.
  • Select Tag in HTML5Aug 29, 2011. This element is used in conjunction with the option element to produce a list of options that the user can choose from.
  • Time tag in HTML5Aug 30, 2011. The time tag defines date, time or date and time both by using this tag in the html document.
  • Option tag in HTML5Sep 01, 2011. The option tag is used for defining option items within a list.
  • User Tracking Servlet in JavaSep 06, 2011. Here we will discuss about Url rewritting; a process to create an explict querystring with the help of a hyperlink.The href attribute of <a> tag can contain path of the destination with the querystring.
  • Service Contract in WCFSep 08, 2011. Service contract means the collective mechanisms by which a service’s capabilities and requirements are specified for its consumers.
  • Attribute Oriented Programming: Part 2Sep 15, 2011. In this article we will have a deeper look into what we actually did in our first try at Attributes and also look at some of the features used.
  • Attribute Oriented Programming: Part 1Sep 15, 2011. In this series we will be learning about the Attribute Oriented Programming . How it can help us write simpler and beautifull code .
  • Placeholder Attribute in HTML5Oct 07, 2011. In this article we will take a look at the placeholder attribute in html5 for input elements which provides the very useful, and frequently used functionality of displaying informative text, within the input element, which gets hidden when the user clicks on it.
  • Using the Confirm Attribute in MVC 3 EffectivelyNov 10, 2011. This article mainly focuses on how to make sure that the properties within the particular class are matched and operations are performed well.
  • ScaffoldColumn(bool value) vs HiddenInput(DisplayValue = bool value) in MVCNov 11, 2011. In this article, we will see what the use of ScaffoldColumn and HiddenInput. We will also compare what the key differences between these two attribute and what scenario we should consider these attributes for usage. So, accordingly prior to my articles on MVC we will just add these attributes and we will see what the best we can produce.
  • Attributes in JQueryNov 13, 2011. Here we will discuss about the attributes used in JQuery, In the JQuery API there are attributes which contains many methods.
  • Audio tag in HTML5Nov 22, 2011. This new element allows you to deliver audio files directly through the browser, without the need for any plug-ins. embedding the audio file into a web page via the src attribute.
  • MessageName property of WebMethod in Web ServicesDec 05, 2011. In this article you will learn about the MessageName property of the WebMethod attribute in web services.
  • WebService Attribute's Property in Web ServiceDec 07, 2011. The WebService attribute is used for giving a description of a web service by adding some information. In this article you will learn about the properties of the WebService attribute.
  • Sandbox Security in HTML5Dec 17, 2011. In this article I have explored the basic if sandbox attributes in HTML5 to provide security to the host pages while using IFRAME.
  • How to Work With Custom Method in WCF Data ServiceJan 13, 2012. In this article we will see how to expose a custom method in WCF Data Service.
  • How to Find All the Constructors, Fields and Methods of a Class in JAVAJan 25, 2012. This is the technique to find the internal structure of any class and used its attribute according his definition.
  • Create a File Attributes Changer / Locker in a C# Windows ApplicationJan 28, 2012. In this project I have created not a file locker but a user friendly file attributes changer.
  • WebMethods Attribute in ASP.NET Web ServiceJan 29, 2012. The WebMethod attribute can make development of XML Web Services easier.

About Attributes

An Attributes is a property of an any objects. In the database management system there are number of attributes are used. for example a record of table which have name,age,id etc. all these are treats as the Attributes and name of relation values which are changeable property or characteristic of some component of a program that can be set to different values. The HTML (Hypertext Markup Language) have number of their Attributes which are used for designing good environment likes font family, color, style, alignment etc. An HTML user can set font attributes, such as size and color to different values. In computer Object oriented programming language is based on the class and object of class and that class have some properties of behaviors called Attributes. SQL database table have multiple Attributes which is used for describe the unique identity of Attributes.

SPONSORED BY

C# Corner Chandigarh DevCon16
Chandigarh DevCon16 is a one-day Developer Conference where programmers, technologists, authors, and members meet, demonstrate, plan, and hang out.
techbash 2016