TechyMedia

A .NET Technology blog | .NET,C# Progamming,C# tutorials,WPF WCF|Software Engineer

NAVIGATION - SEARCH

What is STAThread Attribute?

Attribute [STAThread] is a mandatory attribute for all windows forms application. STAThread attribute need to be applied to set the current thread apartment state as single threaded. This means that the COM threading model for the application is single-threaded apartment.
Attribute [STAThread] is a mandatory attribute for all windows forms application. STAThread attribute need to be applied to set the current thread apartment state as single threaded. This means that the COM threading model for the application is single-threaded apartment. [More]

C#- New Instance creation in a constructor Vs new in a member declaration, VB.NET

Is there any difference in creating new instance in constructor or create new instance as member declaration. initialize variable within constructor or outside constructor,which is best? Is there any performance or memory difference? These are some basic doubts many developers have.
Is there any difference in creating new instance in constructor or create new instance as member declaration. initialize variable within constructor or outside constructor,which is best? Is there any performance or memory difference? These are some basic doubts many developers have. [More]

What is Typed Dataset In C#,VB.NET?

Typed Datasets(Strongly Typed Datasets) are specialized Dataset class.Typed datasets are strongly typed and hence gives compile time error when assigned data column with wrong type value.You can create Typed Dataset in 2 different manners.Using Visual Studion typed dataset designer ad using XSD.exe.
Typed Datasets(Strongly Typed Datasets) are specialized Dataset class.Typed datasets are strongly typed and hence gives compile time error when assigned data column with wrong type value.You can create Typed Dataset in 2 different manners.Using Visual Studion typed dataset designer ad using XSD.exe. [More]

XML Serialization and Deserialization using XSD -C#,VB.NET

Convert xml to xsdXml serialization in .NET can be done in various ways.but the easiest one which I believe is using xsd.exe to create the corresponding model dataset class from the xml file.Step by step procedure explained.xml to xsd conversion
Convert xml to xsdXml serialization in .NET can be done in various ways.but the easiest one which I believe is using xsd.exe to create the corresponding model dataset class from the xml file.Step by step procedure explained.xml to xsd conversion [More]

Difference between Custom Controls,User controls and Components in C#.NET

User control and custom control are direct or indirect derivations of Control class.Control in turn is derived from component.Controls are much more rich than components feature wise. Components don't have GUI like user controls or custom controls.Components are more of APIs.Examples of .NET components are Times,File Browser,Data Source etc. A component can't contain controls inside it. [More]

How To Create Custom Control in C# Windows Forms

c# custom button - Custom controls are specialized controls in .NET derived from Control class.This article explains step by step process of creating a custom control in C# Winform application.
c# custom button - Custom controls are specialized controls in .NET derived from Control class.This article explains step by step process of creating a custom control in C# Winform application. [More]

XPATH With Default Namespace In C# - XpathNavigator

This article explains the sample C# code using XPath Navigator to select an XML element from an XML file which is having a default namespace.Normal xpath expression won't return anything if there is a namespace defined in Xml file.
This article explains the sample C# code using XPath Navigator to select an XML element from an XML file which is having a default namespace.Normal xpath expression won't return anything if there is a namespace defined in Xml file. [More]

C# .NET- How To Read CDATA Section

Article explains how to Extract cdata from xml. CDATA (Character Data) is used to store information in XML file as unparsable data so that no parser will parse it and will be treated as pure char string. In this article I am explaining how to read the data stored as CDATA section in an XML file using XmlDocument in C# .NET.
Article explains how to Extract cdata from xml. CDATA (Character Data) is used to store information in XML file as unparsable data so that no parser will parse it and will be treated as pure char string. In this article I am explaining how to read the data stored as CDATA section in an XML file using XmlDocument in C# .NET. [More]

XML document parsing in .NET - Best and efiicient options

.Net framework has got various mechanisms for reading and querying XML documents.But what are the pros and cons of each of these methods? which is the best efficient mechanism out of all these? Which is most efficient in terms of performance? Which is simpler and faster to code?
.Net framework has got various mechanisms for reading and querying XML documents.But what are the pros and cons of each of these methods? which is the best efficient mechanism out of all these? Which is most efficient in terms of performance? Which is simpler and faster to code? [More]

C# Static methods vs Instantce methods

Programmers most of the time create a class instance to invoke a method even when there is nothing to do with the instance.Means, the execution of the method has nothing to do with the state of the class object.Static method execution is faster ,it reduces the required lines of code and hence more cleanliness in code.
Programmers most of the time create a class instance to invoke a method even when there is nothing to do with the instance.Means, the execution of the method has nothing to do with the state of the class object.Static method execution is faster ,it reduces the required lines of code and hence more cleanliness in code. [More]