Tag: C#
How to Find if the Number is a Power of 2 using Bitwise Operator in C# ?
If you need to find out if the number is a Power of 2 using BitWise Operator in C# , below is a sample code snippet that demonstrates how to do it. How to Find if the Number is a Power of 2 using Bitwise Operator in C# ?
Concatenate or Join a string Array using LINQ in C#
Want to join the items inside the string array say with, delimiter using LINQ in C#? It’s pretty easy. Below is a sample code snippet demonstrating in easy steps on how to concatenate a string array using LINQ in C#? Concatenate or Join a string Array using LINQ in C#
Example for Declarative vs. Imperative Style Code in C#
Are you looking out for an example of declarative vs imperative style code in c# ? . Below is a sample source code snippet that demonstrates the declarative vs. imperative code in C#. Example for Declarative vs. Imperative Style Code in C#
How to remove the non ascii characters from a string in C# ?
Regular expression comes in handy especially if you want to remove the non ascii characters from a string in C#. Here’s a regular expression sample in C# demonstrating how to do it. How to remove the non ascii characters from a string in C# ? The output of the code snippet will be cde in C#
How to Implement Interfaces in C# ?
Once the interface is created or available , you might want to implement the functionality of the interface in your class . How to Implement Interfaces in C# ? To implement an interface , we must declare and provide implementations for each functions in your class. Below is a sample code snippet that demonstrates how to implement interface in C#.
How to Concatenate Array of Integers to a String in C# ?
Below is a sample code snippet demonstrating how to concatenate array of integers to a string in c#. How to Concatenate Array of Integers to a String in C# ?
How to Create Extension Method in C# ?
Extension methods are great way to add a method to an existing type . A typical scenario is when you dont have the access to the sourcecode and want to add a method to the type . How to Create Extension Method in C# ? Below is a sample code snippet that demonstrates how to create an extension method for the integer type to tell…
How to Get the IP address in Winforms/Console Application using C#?
Below is a sample code snippet demonstrating in simple steps on how to retrieve the IP address in the Winforms or Console APPLICATION using c#. How to Get the IP address in Winforms/Console Application using C#?
Tools to Convert Java to C# Source Code
There are times when a developer would have done a project using Java and would want to reuse some of the data classes or business logic to C# for developing application on different platform. Tools to Convert Java to C# Source Code Below are some of the tools that can be used to convert the code from Java to C# . Sharpen This is a…
How to Get the Max Value from a List of Integer using LINQ Query in C#?
One of the easiest way to get the Max value from a List of Integer in C# is to use LINQ extension method. The LINQ in C# provide the Max method which can be used to retrieve the Max Value from the List. How to Get the Max Value from a List of Integer using LINQ Query in C#?
How to send email in Windows Phone 8 Application Programatically using C#?
The Windows Phone 8 SDK provides the EmailComposeTask which can be used to send email in Windows Phone 8 Programatically. The EmailComposeTask launches the Email Compose screen which lets the user to verify the email content and tap on the “send” button to send email. How to send email in Windows Phone 8 Application Programatically using C#? Below is a sample code snippet that demonstrates…
How to merge two lists using LINQ’s Union in C#?
Below is a sample code snippet demonstrating in simple steps on how to merge two lists using LINQ’s Union extension method in C#? How to merge two lists using LINQ’s Union in C#?