Tag: C#
How to Declare Array of Objects in C# ?
Do you want to declare an array of objects in your C# application ? . Below is a sample code snippet that demonstrates how to declare an integer array in C#. How to Declare Array of Objects in C# ?
How to Get the Dictionary Key by value in C# ?
If you want to get the Key of a dictionary based on the value in C# , you can use the LINQ’s where clause o FirstOrDefault method. How to Get the Dictionary Key by value in C# ?
How to Get the Last Element from LINQ Query in C#?
Below is a sample source code demonstrating How to Get the Last Element from LINQ Query in C#? How to Get the Last Element from LINQ Query in C#?
How to List Odd Numbers from a List of Integers using Lambda Expression in C#?
Are you looking out for a simple logic to retrieve the odd numbers from the list of integers using Lambda Expression in C#? Below is a sample code snippet demonstrating how to do it. How to List Odd Numbers from a List of Integers using Lambda Expression in C#?
How to Launch the Application Details Page in Windows Phone Store using C#?
The Windows Phone 8 SDK provides the MarketplaceDetailTask which lets the users to launch the specified application’s details page in the Windows Phone Store from the Windows Phone App. How to Launch the Application Details Page in Windows Phone Store using C#? Below is a sample code snippet that demonstrates how to use the MarketplaceDetailTask. Modify the Content Identifier to specify the app for which…
How to check the Equality of Anonymous Types in C#?
The Equals method is used to check the equality. The anonymous types will be equal of it has the same order, type, name and values. How to check the Equality of Anonymous Types in C#? Below is a sample sourcecode demonstrating how to check the Equality of Anonymous types in c#.
How to Prevent the Class from Inheriting in C# ?
You can use the keyword “sealed” in C# to prevent the user from inheriting the class. Below is a class that is marked as sealed and is not inheritable. How to Prevent the Class from Inheriting in C# ?
Example of Anonymous Method in C#
Below is a sample code snippet that demonstrates how to use anonymous method to add two numbers in C#. Example of Anonymous Method in C#
How to Create ByteArray from a Stream in C#?
Below is a sample code snippet that demonstrates an easy way to create a ByteArray from the Stream that contains data in C#. How to Create ByteArray from a Stream in C#?
How to find the reverse of a number using C# ?
Below is a sample code snippet that demonstrates how to find the reverse of a number using C# . How to find the reverse of a number using C# ?
How to get the CommandLine of the Current Application in C# ?
You might need to get the information that contains the commandline which is used to execute the current application in C#. How to get the CommandLine of the Current Application in C# ? You can use the CommandLine property of the System.Environment class that provides the necessary information including the application name. The output of the program would be Command line of the Abundantcode app…
How to Remove Objects from the List with RemoveAll in C#?
Below is a sample code snippet demonstrating How to Remove Objects from the List with RemoveAll in C#? How to Remove Objects from the List with RemoveAll in C#?