Ads by Lake Quincy Media
| Next Tip?
Home » Archive

Articles in the CSharp Category

CSharp »

[26 Jun 2009 | 4 Comments | 611 views]

using System;
class SortReverse
{
public static void Main()
{
int[] x={30,10,80,90,20};
Console.WriteLine(“Array Before Sorting”);
foreach(int i in x)
Console.Write(” “+i);
Console.WriteLine();
Array.Sort(x);
Console.WriteLine(“Array After Sorting”);
foreach(int i in x)
Console.Write(” “+i);
Console.WriteLine();
Array.Reverse(x);
Console.WriteLine(“Array After Reversing”);
foreach(int i in x)
Console.Write(” “+i);
Console.WriteLine();
}
}
Hi,
Here is a simple way to sort an array. We can use the Array.Sort() function for applying the sorting. Here I am going to display a short code snippet for your use. Try and and post your comments here. If any suggestions or need some clarifications
using System;

class SortReverse
{
public static void Main()
{
int[] x={30,10,80,90,20};

Console.WriteLine(“Array Before Sorting”);
foreach(int i in x)
Console.Write(” “+i);
Console.WriteLine();

Array.Sort(x);

Console.WriteLine(“Array After Sorting”);
foreach(int …

Asp.net, CSharp »

[11 Jun 2009 | One Comment | 2,750 views]

Sending Email Through ASP.NET using C#
The following Sample Code is the code which can be used to send mails through ASP.Net C#…. its a working code for me…..

<pre>using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.
WebParts;
using System.Web.UI.HtmlControls;
using System.Net.Mail;
public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
//Calling the function SendMail
Response.Write( SendMail(“meetuchoudhary@gmail.com”,”meetudmeet@gmail.com”,”meetudmeet@yahoo.com”,”Test Mail”,”Test Mail Body”));

CSharp »

[14 Feb 2009 | No Comment | 470 views]

Introduction
In a simple words Constructor is nothing but a method, a special kind of method of a class, which gets executed when its (class) object is created.
Now, let’s take above in broader sense, A constructor is a class method automatically executed whenever class’s object is created or whenever class is initialized. Consider following bit of code:

public class MsDotNetHeaven
{
public MsDotNetHeaven()
{
//A default Constructor
}
//Class members
}

In above snippet, …

Get Adobe Flash playerPlugin by wpburn.com wordpress themes