BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan Right Header

HOME BZU Mail Box Online Games Radio and TV Cricket All Albums
Go Back   BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan > Institute of Computing > Bachelor of Science in Computer Science > BsCS 6th Semester > Visual Programming


Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 17-06-2011, 09:49 PM
thecool's Avatar
Senior Member


 
Join Date: Apr 2009
Location: Multan
Posts: 1,163
Contact Number: Push me a PM if you really need
Program / Discipline: Alumni
Class Roll Number: ---
thecool has a reputation beyond reputethecool has a reputation beyond reputethecool has a reputation beyond reputethecool has a reputation beyond reputethecool has a reputation beyond reputethecool has a reputation beyond reputethecool has a reputation beyond reputethecool has a reputation beyond reputethecool has a reputation beyond reputethecool has a reputation beyond reputethecool has a reputation beyond repute
Default c sharp overloading program

c sharp overloading programs with source code
Code:
using System;
using System.Collections.Generic;
using System.Text;

namespace overloading
{
class overload
{
public void ovl()
{
Console.WriteLine("No Parameters.");
}

public void ovl(int a)
{
Console.WriteLine("One parameter is passed i.e " + a);
}

public int ovl(int a, int b)
{
Console.WriteLine("Two parameters are passed they are" + a + "and" + b);
return a + b;
}

public double ovl(double a, double b)
{
Console.WriteLine("Two double parameters are passed they are" + a + "and" + b);
return a + b;
}
}
public class poly
{
static void Main(string[] args)
{
overload ob = new overload();
int resi;
double resd;

ob.ovl();
Console.WriteLine();

resi = ob.ovl(4, 6);
Console.WriteLine("Result  of adding these integers is" + resi);
Console.WriteLine();


resd = ob.ovl(1.11, 1.12);
Console.WriteLine("Result of adding these doubles is:" + resd);
Console.WriteLine();
Console.ReadLine();

}
}

Reply With Quote
Reply

Tags
overloading, program, sharp


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Prime number in c sharp thecool Visual Programming 0 17-06-2011 09:52 PM
inheritance | example | source code in C sharp thecool Visual Programming 0 17-06-2011 09:50 PM
Array program in C sharp thecool Visual Programming 0 17-06-2011 08:59 PM
C-Sharp Program Double Linked List (All Functions In One Program) thecool Visual Programming 0 17-06-2011 08:58 PM

Best view in Firefox
Almuslimeen.info | BZU Multan | Dedicated server hosting
Note: All trademarks and copyrights held by respective owners. We will take action against any copyright violation if it is proved to us.

All times are GMT +5. The time now is 10:23 AM.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.