Home » Tutorials » Archive by categoryC# (Page 2)

Use of Private Constructor in C# with an example

Use of Private Constructor in C#
Use of Private Constructor in C# Hey folks, till day you have read Difference between Throw and Throw ex in C#, Difference between Var and Dynamic in c#,Difference Between WCF and WebAPI , Difference between String and string in C#, Difference between Nullable<> and ?,Difference between Hashtable and Dictionary,Insert data into Database...
Continue reading

Difference between Throw and Throw ex in C#

Difference between Throw and Throw ex in C#
Difference between Throw and Throw ex in C# Hey folks, till day you have read Difference between Var and Dynamic in c#,Difference Between WCF and WebAPI , Difference between String and string in C#, Difference between Nullable<> and ?,Difference between Hashtable and Dictionary,Insert data into Database table using SQLBulkCopy class...
Continue reading

Use of Yield in C#

Use-of-Yield-Keyword-in-C-sharp
Use of Yield in C# Quote from MSDN “The yield keyword signals to the compiler that the method in which it appears is an iterator block. The compiler generates a class to implement the behavior that is expressed in the iterator block. In the iterator block, the yield...
Continue reading

Enumerate Enum C# with Examples

Enumerate-Enum-C#
How to enumerate Enum C# Problem: We have enum declared in our class and we want to enumerate enum. How could we enumerate enum let’s together try to understand. Sometimes we get error message like “Enum is a type but used as a variable”. So how can we overcome...
Continue reading

Run Tasks Parallelly in C#

Run-Task-Parallelly-in-Csharp-social
Run Tasks Parallelly in C# Hello folks today I am going to explain you regarding how could we run tasks parallelly, by using Parallel.Invoke We need to add System.Threading and System.Threading.Tasks namespaces. Below is the code snippet to run tasks parallelly in C#.  I have added two method...
Continue reading

Convert List to XML in C#

Convert-List-to-XML
Convert List to XML in C# Hello folks, today I am going to explain how could we convert List to XML in C# using LINQ. Let’s take one example and try to understand whole concept. In below example we have List of Employee class and has been converted...
Continue reading

Get Message Info Of SQL Server In C#

GetMessageInfoOfSQLServerInCsharp
Get Message Info Of SQL Server In C# Today I am going to explain you how to get message information of SQL Server in C#.You must have a question,Why this would be helpful to us? Most of us, used to create Stored Procedure in Sql Server database to...
Continue reading

Fetch Hardware Information Using C#

Fetch-Hardware-Information-your-computer
Fetch Hardware Information Using C# Hello friend today we will learn how could we fetch Hardware Information of your computer such as available You can get your system information like System Information, Processor Information, Get Computer Name,Processor Id, HDD Serial No, System MAC Address, System Account Name, Motherboard...
Continue reading

Fetch all installed Printers in c#

GetAllInstalledPrintersInCsharp-Output
Fetch all installed Printers in c# To fetch all installed Printers list in C#, you should add reference of System.Drawing.Printing add same as a name space in our program. In System.Drawing.Printing, InstalledPrinters is available under PrinterSettings class as shown below: Below is the code snippet for Fetch all installed Printers in c#...
Continue reading

Get all installed Serial Port using C#

Get-all-installed-Serial-Port-using-csharp
Get all installed Serial Port using C# Today we will learn about Serial Port, how to get all installed Serial Port using C#. We would be required “System.IO.Ports” namespace .  We get all list of Serial ports using SerialPort.GetPortName() method as list of string array. Below is the code...
Continue reading




DISCLAIMER:
The content is copyrighted to technothirsty.com and may not be reproduced on other websites without permission from the owner.You may contact us using the information below.