MCA SY Visual Programming Tools
Unit 1 Introduction to ASP.NET
Unit 1 Introduction to ASP.NET
Practical List
Notes for BCA BSC BSc.SE
MCA SY Visual Programming Tools
Unit 1 Introduction to ASP.NET
Unit 1 Introduction to ASP.NET
Practical List
using System;
namespace SampleApp
{
public delegate string MyDel(string str);
class EventProgram
{
event MyDel MyEvent;
public EventProgram()
{
MyEvent += new MyDel(show);
}
public static string show(string str)
{
return str;
}
static void Main(string[] args)
{
EventProgram obj1 = new EventProgram();
string result = obj1.MyEvent("Event fired");
Console.WriteLine(result);
}
}
}
using System
namespace IndexerDemo {
class INames {
private string[] list = new string[size];
static public int size = 10;
public INames() {
for (int i = 0; i < size; i++)
list[i] = "N. A.";
}
public string this[int index] {
get {
string tmp;
if( index >= 0 && index <= size-1 ) {
tmp = list[index];
} else {
tmp = "";
}
return ( tmp );
}
set {
if( index >= 0 && index <= size-1 ) {
list[index] = value;
}
}
}
static void Main(string[] args) {
INames names = new INames();
names[0] = "seema";
names[1] = "Riya";
names[2] = "Neeta";
names[3] = "Asif";
names[4] = "Diya";
names[5] = "Sunil";
names[6] = "Ruba";
for ( int i = 0; i < INames.size; i++ ) {
Console.WriteLine(names[i]);
}
Console.ReadKey();
}
}
}
The out parameter in C# is a keyword used to pass arguments by reference, allowing a method to return multiple values or modify variables outside its scope.
Unlike regular parameters, variables passed as out arguments do
not need to be initialized before the method call.
Key
Characteristics
using System;
using static
System.Console;
namespace OutExample
{
class Program
{
static void Main(string[] args)
{
WriteLine("Please enter
radious for circle");
double radious = Convert.ToDouble(ReadLine());
double circumference = CalculateCircle(radious,
out double area);
WriteLine("Circle's
circumference is "+circumference);
WriteLine("Circle's Area is "+area);
}
static double CalculateCircle(double
radious, out double area)
{
area = 3.14 *radious*radious;
double circumference = 2 * Math.PI *
radious;
return circumference;
}
}}
MCA FY
Data structure Practical list Previous Year Question Paper
MCA FY Sem I
MCA-R 102 Data structure using C
Chapter 1 Introduction to Algorithm
Chapter 2 Introduction to Data Structures
Chapter 4 Sorting and Searching