| Next Tip?
Home » Archive

Articles in the CSharp Category

CSharp »

[12 Jul 2009 | 2 Comments | 1,748 views]

I have asked the same question from one of my readers with the following scenario:
Sir,
I am creating a console application in which I need to get comments from a text file and display in a group of SingLine Comments and MultiLine Comments.
The following code snippet described the whole solution by-itself:
#region Author initials
/* How to get comments from
* a text file
* Author : Gaurav Arora
* Date : July 12, 2009
* Series: A Step Ahead Series*/
#endregion
#region Namespaces Used
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
#endregion
namespace ReadingCommetFile.AstepAheadSeries
{
#region Class displaying Comments
class Program
{
static void Main(string[] args)
{
//Set the …

Asp.net, Asp.net, CSharp »

[6 Jul 2009 | 2 Comments | 241 views]

Hi All,
The image processing is a very typical task, but still it is simple to do. There are application where we need to create the thumbnail of the uploaded images, at that time we need to resize the image. here is the sample code through which we can resize the image easily..
We just need to use the 2-3 main name spaces that are
1. System.Drawing
2. System.Drawing.Imaging
3. System.Drawing.Drawing2D
with the use of these name spaces we can do our task. i have made a function by which we can create the thumbnail of …

CSharp »

[28 Jun 2009 | One Comment | 223 views]

Empty the Recycle Bin

Ths following code is used to empty the recycle bin using Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio
The namespace we have to use is:
using System.Runtime.InteropServices;

then create an enum for recylceflags like

enum RecycleFlgs : uint
{
SHERB_NOCONFIRMATION = 0×00000001,
SHERB_NOPROGRESSUI = 0×00000002,
SHERB_NOSOUND = 0×00000004
}

creating an extern

[DllImport("Shell32.dll", CharSet = CharSet.Unicode)]
static extern uint EmptyRecycleBin
(IntPtr hwnd,

Get Adobe Flash playerPlugin by wpburn.com wordpress themes