Currently browsing category

C#

StringConcat

String Vs StringBuilder

Most of the people use string everywhere in their code. Actually when doing string concatenation, do you know what exactly you are doing? It has a big drawback mainly in concatenation which can be overcome by StringBuilder. It will give a vast improvement in performance when you use concatenation of …

generics2

C# – Generics

Generics allow you to delay the specification of the data type of programming elements in a class or a method, until it is actually used in the program. In other words, generics allow you to write a class or method that can work with any data type. You write the …

class

Static Classes

A static class is basically the same as a non-static class, but there is one difference: a static class cannot be instantiated. In other words, you cannot use the new keyword to create a variable of the class type. Because there is no instance variable, you access the members of …

How to transfer Large File using C# Socket

Now I will discuss about, how we can transfer a large file (file size in GB) using Microsoft dot net socket programming using C# (C sharp) language. This code has written in Visual Studio 2005 (dot net 2). Basic Knowledge To cover this article you need to read my few …

Asynchronous Socket Client for Beginner

It’s a sample client socket code that code based on MSDN sample code. using System; using System.Net; using System.Net.Sockets; using System.Threading; using System.Text; // State object for receiving data from remote device. public class StateObject { // Client socket. public Socket workSocket = null; // Size of receive buffer. public …