As we learn all, C dont supprot Inheretic, Polymorphism, Function Overloading... And Few Other Things...
My Question is:
What is this one?
[IMG]http://img705.imageshack.us/img705/5661/wico.png[/IMG]
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Example
{
public partial class WForm : Form
{
public WForm()
{
InitializeComponent();
Init();
}
private void Init()
{
Student _ST = new Student(1234, "History", 10.0f);
_ST.Write();
this.Controls.Add(_ST.RTB);
}
}
// :Form To Use RichTextBox...s
class Student : Form
{
// Variables
private int AM;
private string Lesson;
private float Grade;
public RichTextBox RTB;
public Student(int kAM, string kLess, float kGrade)
{
AM = kAM;
Lesson = kLess;
Grade = kGrade;
}
public Student(int JustAM)
{
AM = JustAM;
}
public void Write()
{
RTB = new RichTextBox();
//Styling...
RTB.Dock = DockStyle.Fill;
RTB.BackColor = Color.CornflowerBlue;
RTB.ForeColor = Color.White;
RTB.Font = new Font("Arial", 12);
RTB.Text = "Version 1: (1234, History, 10.0f)\n"
+ "\nAM: " + AM + "\nLesson: " + Lesson + "\nGrade: " + Grade + "\n\n";
}
}
}