عرض المشاركات من يوليو, 2011

How to add custom sorting for a class with IComparable interface

Sometimes it necessary to sort your collection before showing it on UI. You can add custom sorting to your class just by inheriting it with the  IComparable interface.IComparable interface contains one single method CompareTo .…

Calculate hash for a file in C#

In this article, I will show you how to calculate the hash of a given file in C#. Before that let’s understand what is hash and why it is important. A hash function is used to convert data to other data of fixed size Here…

How to convert byte array to string in c#

This is a very simple code showing how to convert byte array to string in c# Make sure that you have imported the namespace System.Text using System ; using System . Collections . Generic ; using System . Linq ; usi…

How to convert string to Byte array in c#

This is very simple code showing how to convert string to byte array in c# # How to convert byte array to string in c# using System ; using System . Collections . Generic ; using System . Linq ; using System . Text ;…

How to embed exe or resource file in c# assembly

Sometimes it is necessary to embed an executable or exe (or any other file) into your application and later recreate it during runtime. In this post, I will show you how to embed a resource in assembly (application) Open vi…

How to encrypt/decrypt data in asp.net using Symmetric algorithm

In this post, I am going to show you how to encrypt and decrypt data in asp.net using Symmetric algorithm. Before going to implementation details let discuss some security-related terms before. What is Hashing Hashing is o…

How to compress response in asp.net

In this post, I will show you how to compress HTTP response in asp.net for improving performance. Before going into details, let’s create a simple website with single page Default.aspx and add the following code into it Default.…

How to Hash User Passwords in asp.net

Web application security is very crucial because attacks against web apps are the top cause of data breaches. Business /company need security to protect their data and assets. Many developers confused between hashing and enc…

تحميل المزيد من المشاركات
لم يتم العثور على أي نتائج