Friday, November 29, 2013

पति ने अपना अधिकार जताते हुए कहा

husband and wife jokes


पति ने अपना अधिकार जताते हुए कहा …


पति-पत्नी के जगडे में पत्नी कुछ बढ-चढकर बोल गई |

पति ने अपना अधिकार जताते हुए कहा – मैं कहता हूं , अपने शब्द वापस ले लो |


पत्नी बोली – नहीं लेती |


पति ने फिर गुस्से में कहा – आखिरी बार कहता हूं अपने शब्द वापस ले लो , मैं तुम्हें पांच मिनट का समय देता हूं |


पत्नी ने शांत भाव से पूछा – और अगर पांच मिनट के अंदर अपने शब्द वापस न लिए तो ?


पति ने कहा- अच्छा , तो तुम्हें कितना समय चाहिए ?



पति ने अपना अधिकार जताते हुए कहा

Tuesday, November 26, 2013

Tu online hai, main bhi online hun

Tu online hai, main bhi online hun


Tu agar jo fine hai toh main bhi yaar fine hun,

Tera status update padhke maine dekha,


Ye line to teri nahi, toh kidhar se tu chepa,

Teri friendlist toh mere se bhi lambi hai,

Kabse teri first language angrejji hai?

Arre mere chat ka reply ab tak diya nahi

Kispe laga pada hai, tu aaj bhi suddhra nahi,

Fir bhi meine like kiya tere comment pe,

Mere comment ka bhi samajh, sentiment re,

Tu online hai, main bhi online hun,

Coincidence nahi re main, mobile pe all the time hun,

Tu bhi online, main bhi online, ping to kar zara tu,

Friendship request bheji thi pichhle month ko,


Ab jake accept kiya, tum na bade jhand ho,

School college mein toh, you were such a Champu,

Facebook twitter mein popular kaise ban gaya tu,

Mutual friends hai itne par kisi ko, I don’t know,

Tune liya naya haircut, please show show show

Photoshop kiya hua maine tera DP dekha,

Apni bhaddi profile ko tune kya mast lipa pota,

Tu online, main bhi online, kahan bhagega beta


Mere bhi facebook mein, photos kitne gande hai,

Chubby chubby si lag rahi hun, gaalon mein jaise ande hai

Naye pic mein tum bhi kya smile de rahe ho,


Kya gam hai jo itna chhupa rahe ho,

FB ka ye settings kahan se change karun,


Faltu ke notifications kaise band karun,

Tere timeline pe, mere timeline pe,

Dekh ye naya hai koun, maar raha hai line be,

Tu bhi online, main bhi online, chat vat toh kar le re,

Sabka chakkar chalu hai ab tera kounsa on hai,

Aaj bhi sukhe halat mein hai, ya intupintu toing hai,

Pata hai kya , pata hai pata hai,

Chiki aur chandapulam ka break up hua hai,


Gandu apne baap ki gadi thok aaya hai,

Jaanu ki jaan ko heart attack aaya hai,


Credit card ka fatka aisa tagda khaaya hai,

Ramcharan ne bhi marital status chupaya hai,


Ek tere juicy affair ka news aaya hai

Arre tu online hai, main bhi online hun,


Magar teri tagging se main badi hi pareshan hun,

Tu bhi online, main bhi online, par line pe ab aa tu,

Ab dekho ye koun hai? Aaiye aaiye..

Dil kare ki tujhko main chappal uthake marun,

Chaddi buddy the hum, kya teri abhi utarun,


Tune shaddi vaddi kar li,

mujhe invite bheja nahi,

Tujhko na kiya delete,

to mera naam tejaa nahi,

Baaki group ke friends,

meri party mein aana,


All the boys,

get your girls,

and girls tum boyz patakar lana,

Longtime no C,

email bhi kara nahi,


Bhabhiji ko secrets bata dun kya main abhi,

Ab to subscribe kar,

mera video like kar,

Share kar mera ye post,

mere dost,

nahi to fod dungi computer,

Abbe tu kyun offline hai,

main ab bhi online hun,

Tune off kar li chat,

achcha kya samajha humko jhantu,

Tu bhi online,

main bhi online,

subscribe kar zara tu,

subscribe kar le free mein tu….




Tu online hai, main bhi online hun

Saturday, November 23, 2013

Leopard Kills Female Baboon But Saves Its Baby From Hyenas

Leopard Kills Female Baboon But Saves Its Baby From Hyenas



A Female Leopard Kills Female Baboon But Saves Its Baby From Hyenas


A leopard cub kills a baboon then discovers its baby. The leopard’s reaction is just awesome!


I think this is narrated by the fabulous actor Jeremy Irons.



Leopard Kills Female Baboon But Saves Its Baby From Hyenas

Leopard Kills Female Baboon But Saves Its Baby From Hyenas

Leopard Kills Female Baboon But Saves Its Baby From Hyenas



A Female Leopard Kills Female Baboon But Saves Its Baby From Hyenas


A leopard cub kills a baboon then discovers its baby. The leopard’s reaction is just awesome!


I think this is narrated by the fabulous actor Jeremy Irons.



Leopard Kills Female Baboon But Saves Its Baby From Hyenas

Sachin Tendulker - Century Of Records

Sachin Tendulkar


Sachin Tendulker – Century Of Records


  1. Highest run getter in test matches (15,921).

  2. Highest run getter in ODIs (18,426).

  3. 15,310 of his runs came while opening the innings with the aid of 45 centuries and 75 fifties in 340 innings- most by an opener.

  4. Most number of centuries in Test matches – 51.

  5. Most number of centuries in ODIs – 49.

  6. Most number of man of the match awards (62) in the ODIs. Sanath Jayasuriya with 48 is second. The third on the list is South Africa’s Jacques Kallis with 32 awards.

  7. Most number of man of the series awards (17) in ODIs.

  8. Best average for man of the matches in ODIs.

  9. First cricketer to reach 10,000–11,000–12,000–13,000–14,000–15,000–16,000–17,000–18,000 runs in the ODIs.

  10. Only player ever to cross the 14,000–15,000–16,000–17,000 and 18,000 run marks in ODIs.

  11. He is the highest run scorer in World Cups (2,278 at an average of 56.95)

  12. Most number of the man of the match awards in World cups.

  13. Most number of runs in the 1996 World cup – 523 runs at an average of 87.16.

  14. Most number of runs in the 2003 World cup – 673 runs in 2003 Cricket World Cup, highest by any player in a single Cricket World Cup.

  15. Most number of Fifties in ODIs – 96.

  16. Highest number of 50+ scores in ODI’s – 145 (49 Centuries and 96 Fifties).

  17. First player to have scored over 100 innings of 50+ runs in ODIs.

  18. Appeared in most number of tests – 200. Kapil Deo is the next one with 131 test appearences.

  19. Appeared in most number of ODIs – 463.

  20. First player to score 200 runs in an ODI.

  21. Tendulkar top-scored for India on 129 occasions – most such occasions for any player in ODIs.

  22. He was the first players to complete the all-round treble of 10000 runs, 100 wickets and 100 catches.

  23. Is the only player to have made three scores of 175 or more.

  24. Is the only player with five scores of 150 or more.

  25. Holds the record for scoring 1,000 ODI runs in a calendar year on most occasions. He did so seven times – 1994, 1996, 1997, 1998, 2000, 2003 and 2007

  26. Tendulkar has scored over 1,000 ODI runs against all major Cricketing nations.

  27. Has played ODIs with 866 players (teammates and opponents) – most for any player in ODI history.

  28. He has most scores in 90s: 18 (including one not out innings).

  29. He Was involved in 99 century partnerships – most by any player.

  30. Tendulkar was the first batsman to score over 3,000 runs against an opponent (3,077 runs against Australia).Since then he has also done this against Sri Lanka (3,113 runs).

  31. Tendulkar was the fastest to reach 10,000 runs taking 259 innings and has the highest batting average among batsmen with over 10,000 ODI runs.

  32. Tendulkar is the only Indian to score a century on ODI captaincy debut (110 v Sri Lanka at Colombo RPS on 28 August 1996).

  33. Tendulkar was the first Indian player to score a century and capture four wickets in the same ODI (v Australia at Dhaka on 28 October 1998).

  34. 11.27% of all the runs and 24.50% of all the hundreds scored by all Indian batsmen have come from Tendulkar’s bat.

  35. His nine centuries against Australia are the most by any player against a particular country. He occupies the second place too, with eight centuries against Sri Lanka.

  36. Sachin Tendulkar with Sourav Ganguly holds the world record for the maximum number of runs scored by the opening partnership. They put together 6,609 runs in 136 matches that include 21 century partnerships and 23 fifty run partnerships. The 21 century partnerships for the opening pair is also a world record.

  37. Sachin Tendulkar and Rahul Dravid hold the world record for the highest partnership in ODIs when they scored 331 runs for the second wicket against New Zealand in 1999-00 at the Hyderabad.

  38. Only the second player (after Javed Miandad) to appear in SIX World Cups – from 1992 to 2011.

  39. Most ODI runs in a calendar year: 1,894 ODI runs in 1998.

  40. Most Centuries in a calendar year: 9 ODI centuries in 1998.

  41. Longest career span from India side: 24 years 1 day.

  42. Between April 1990 and April 1998 Tendulkar played 185 consecutive matches – all time record.

  43. He is the only player to be in top 10 ICC Batsmen ranking for 10 years in Tests.

  44. He was the first cricketer to receive the Rajiv Gandhi Khel Ratna, India’s highest sporting honor only to be followed by Mahendra Singh Dhoni.

  45. In 2002, Wisden rated him as the second greatest Test batsman after Sir Donald Bradman.

  46. In 2003, Wisden rated Tendulkar as the No. 1 and Richards at No. 2 in all time Greatest ODI players.

  47. He was involved in unbroken 664-run partnership in a Harris Shield game in 1988 with friend and team mate Vinod Kambli.

  48. Tendulkar is the only player to score a century in all three of his Ranji Trophy, Duleep Trophy and Irani Trophy debuts.

  49. In 1992, at the age of 19, Tendulkar became the first overseas born player to represent Yorkshire.

  50. Tendulkar has been granted the Rajiv Gandhi Khel Ratna, Arjuna Award, Padma Shri and Padma Vibhushan by Indian government. He is the only Indian cricketer to get all of them.

  51. Tendulkar has scored over 1000 runs in a calendar year in ODIs 7 times.

  52. Tendulkar has scored 1894 runs in calendar year in ODIs most by any batsman. These are most runs scored by a batsman in any season in ODI cricket. Tendulkar scored 9 centuries that year.

  53. He has the least percentage of the man of the matches awards won when team loses a match in ODIs. Out of his 62-man of the match awards only 5 times India has lost.

  54. Tendulkar most number man of match awards (12) against Australia cricket team.

  55. In August 2003, Sachin Tendulkar was voted as the “Greatest Sportsman” of the country in the sport personalities category in the Best of India poll conducted by Zee News.

  56. In November 2006, Time magazine named Tendulkar as one of the Asian Heroes.

  57. The current India Poised campaign run by The Times of India has nominated him as the Face of New India next to the likes of Amartya Sen and Mahatma Gandhi among others.

  58. Tendulkar was the first batsman to score over 50 centuries in international cricket.

  59. Tendulkar was the first batsman to score over 75 centuries in international cricket.

  60. Has the most overall runs in cricket, (ODIs+Tests+Twenty20s), as of December 2012 he had accumulated almost 34,074 runs overall.

  61. The 22 century partnerships for opening pair with Sourav Ganguly is a world record.

  62. Sachin Tendulkar and Rahul Dravid hold the world record for the highest partnership in ODI matches when they scored 331 runs against New Zealand in 1999

  63. Sachin Tendulkar has been involved in six 200 run partnerships in ODI matches – a record that he shares with Sourav Ganguly and Rahul Dravid

  64. Most ODI Centuries in a calendar year: 9 centuries in 1998.

  65. Only player to have over 100 innings of 50+ runs (49 Centuries and 96 Fifties)(as of 7 March 2012)

  66. The only player ever to cross the 14,000, 15,000, 16,000, 17,000, 18,000 run marks IN ODI.

  67. Third highest individual score among Indian batsmen (200* against South Africa at Gwalior in 2011).

  68. The score of 200* is the third highest score recorded in ODI matches.

  69. Tendulkar has scored over 1000 ODI runs against all major Cricketing nations.

  70. Sachin was the fastest to reach 10,000 runs taking 259 innings and has the highest batting average among batsmen with over 10,000 ODI runs

  71. Most number of Stadium Appearances: 90 different Grounds.

  72. Consecutive ODI Appearances: 185.

  73. On his debut, Sachin Tendulkar was the second youngest debutant in the world.

  74. When Tendulkar scored his maiden century in 1990, he was the second youngest to score a century.

  75. Tendulkar’s record of five test centuries before he turned 20 is a current world record.

  76. Tendulkar holds the current record (217 against NZ in 1999/00 Season) for the highest score in Test cricket by an Indian when captaining the side.

  77. Tendulkar has scored centuries against all test playing nations.[7] He was the third batman to achieve the distinction after Steve Waugh and Gary Kirsten.

  78. He holds record for the second most number of seasons with over 1000 runs in world in a calendar year.

  79. On 3 January 2007 Sachin Tendulkar (5751) edged past Brian Lara’s (5736) world record of runs scored in Tests away from home.

  80. Tendulkar and Brian Lara are the fastest to score 10,000 runs in Test cricket history. Both of them achieved this in 195 innings.

  81. Second Indian after Sunil Gavaskar to make over 10,000 runs in Test matches.

  82. Became the first Indian to surpass the 11,000 Test run mark and the third overall.

  83. First to score 30,000 international runs.

  84. Tendulkar’s 33,906 runs in international cricket include 18,426 runs in ODIs, 15,470 Tests runs and 10 runs in the lone Twenty20 that India has played.

  85. On 10 December 2005, Tendulkar made his 35th century in Tests at Delhi against Sri Lanka . He surpassed Sunil Gavaskar’s record of 34 centuries to become the man with the most number of hundreds in Test cricket.

  86. Tendulkar is the only player who has 150 wickets and more than 15,000 runs in ODIs.

  87. Tendulkar is the first batsman in history to score 100 centuries in international cricket.

  88. Holds the record for amassing most runs in a winning cause 11157 (average 56.63), including 33 centuries, in 234 matches.

  89. Also has the highest average in a winning cause 56.63 which is the highest among the batsmen with 7000 runs or more in a winning cause.

  90. He completed 50,000 runs on October 5, 2013.

  91. He has got 20 ducks in ODI cricket.

  92. He has scored most runs in boundaries (fours)in ODI cricket 2016*4= 8064.

  93. He has scored 195 sixes in ODI cricket(Not most but in top 10).

  94. He hit 25 boundaries in his unbeaten 200 against south africa , the first and most in a single ODI innings

  95. He is the first batsman who was declared out by “Third Umpire”.

  96. In 24 years, Tendulkar has played in 90 different venues which is a record. [13]

  97. In the six World Cup appearances (1992 to 2011), Tendulkar has amassed 2,560 runs at an average of 56.95 – the most by any player in the history of the event.

  98. Tendulkar has played with and against 989 international cricketers. That includes 141 Indian cricketers and 848 opponents which is a record

  99. He is the first player getting “Bharat Ratna” and he is also the youngest person to get the same in any category.

  100. He is the least percentage of awards for man of the match when the team has lost the match. Out of 62, team India has lost only four times which is a record.


Sachin Tendulker - Century Of Records

Friday, November 22, 2013

Eternal Hindu Culture - Contributions in Space Science

Eternal Hindu Culture - Contributions in Space Science


Eternal Hindu Culture – Contributions in Space Science



Space science or astronomy includes the study of planets, stars, suns and galaxies. The sages of the Vedic era had thought about the galaxies, constellations, sun, moon, planets and eclipses over thousands of years ago.

they made many pioneering discoveries in this field.



Many scholars believe that the Greek and the Arabs learnt space science, mathematics, medicine, etc. from India



Mr Henry Thomas Colebrooke (1765 – 1837 CE) a British Orientalist and Director of Riyal Asiatic Society, Wrote, “Aryabhatta affirmed the diurnal revolution of the earth on its axis. He possessed the true theory of the causes of solar and lunar eclipses, and disregarded the imaginary dark planets of mythologists and astrologers, affirming the moon and primary planets [and even the stars] to be essentially dark and only illumined by the sun”.


Sir monier williams (1819-1899 CE) a Sanskrit lexicographer, said “Whatever conclusions we may arrive at as the orignal source of the first astronomical ideas current in the world, it is probable that to the hindus is due the invention of algebra and its application to astronomy and geometry.”



Eternal Hindu Culture - Contributions in Space Science

Eternal Hindu Culture - Indian Culture Is Pure

Eternal Hindu Culture - Indian Culture Is Pure


Eternal Hindu Culture – Indian Culture Is Pure Because…


It is one of the greatest divine culture in the world due to the importance it gives to purity in thought, feelings, behavior and its religious traditions.


It believes that pure character and spirituality are the pillars of progress in life.


Indian Culture inspires values such as non-violence, truth, self-control and sacrifice right from birth.


It propagates that the greatness of a person does not depend upon his power, welth, beauty or age, but upon his pure character. Nachiketa, Prahlad and Shravan were children, yet they were considered to be great because of their character and faith in God.


Indian culture nurtures good feelings for everyone. It promotes universal ideas like, “The whole world is one family…. May everyone be happy and peaceful, may everyone be united”.


A prayer for purity is chanted by Hindu since centuries: “Bhadram karnehbihi, shrunuyama deva bhadram pashtemakshabhir yajatraha”. I means : “O Bhagwan! May we hear only pure words with our ears, may we see only pure things with our eyes.” – Yajur Veda



Eternal Hindu Culture - Indian Culture Is Pure

Eternal Hindu Culture - Scientific Contributions

Eternal Hindu Culture - Scientific Contributions


Eternal Hindu Culture – Scientific Contributions


Our culture has made scientific contributions in many areas of life.

Thousands of years ago, since the time of Rig Veda, Indian culture had laid the foundations of many branches of science.


The technologies which are being considered “modern” today, were actually thought of and researched upon thousands of years ago by our great sages. To mention a few :


  1. Space Science

  2. Health Science

  3. Metal Science

  4. Transport Science

  5. Different Branches of Physical and Chemical Science

  6. Language Science

  7. Mathematics

  8. Geometry.

The landmark discoveries in these fields have spread the light of scientific knowledge throughout the world.



Eternal Hindu Culture - Scientific Contributions

Wednesday, November 20, 2013

Eternal Hindu Culture - Oldest of all Cultures

Eternal Hindu Culture - Oldest of all Cultures


Eternal Hindu Culture – Oldest of all Cultures Because…


Archaeological excavations in India reveal that India’s culture is at least 10,000 years old. No other living culture today goes back this far. Hindus believe it is the oldest and most vibrant of all world cultures.


Indian scholars say that the Rig Veda is the oldest sacred text in the world. So, Hindus believe that their culture and religion is the oldest in the world.


World hostory notes that thousands of year ago when the people of Greece, Rome, England, other European countries and America were leading a primitive life; our ancestors were living a very dignified and an advanced life. The sun of Indian culture was shining very brightly thousands of years ago.


In spite of foregin invasions India’s culture has survived because of its inner purity, lofty wisdom, and grand religious and cultural traditions. Most importantly, the protector and nourisher of our culture is Paramatma himself.



Eternal Hindu Culture - Oldest of all Cultures

Eternal Hindu Culture - An Introduction

Eternal Hindu Culture - An Introduction


Eternal Hindu Culture – An Introduction


Our eternal Hindu culture means an incredible, timeless tradition of pure thoughts, feeling, social behavior and values which elevate and benefit all.

This culture means unparalleled nobility that was born and flourished in the vast subcontinent called India.

It is also known as “Sanatan Dharma”, “Arya Culture”, “Hindu Dharma” or “Indian Culture”.

Hindu Culture is divine, as it originated from the supreme Paramatma. And through centuries, great avatars, illustrious devas, enlightened sages, sadhus and devotees have maintained, nurtured and enriched this culture and brought it to where it is today.

Indian culture is the mother of all cultures. Bharat (India) is known as “Jagadguru” (Worlds-guru) because of the many gifts it has given to the world.

It is also very rare to to be born in this culture. Our shastras say, ‘Durlabham Bharate Janma”‘.

We shall see three unique aspects of our culture :


  1. It is the oldest living culture,

  2. It is a pure and divine culture, and

  3. It has made contributions in science.


Eternal Hindu Culture - An Introduction

Babul ki ladli hoti hai BETIYA

Babul ki ladli hoti hai BETIYA


Babul ki ladli hoti hai BETIYA


Beti ne papa se sawal kiya ….

Papa……..

Beti bankar ayi hu ma-baap ke jivan me,

Basera hoga kal mera kisi aur ke aangan me,

kyu ye reet “RAB” ne banai hogi,

kehte hai aaj nahi to kal tu parai hogi,

dekhe janam paal-poskar jisne hame bada kiya,

aur waqt aya to unhi hatho ne hame vida kia,

toot ke bikhar jati hai humari zindagi wahi,

par us naye bandhan me pyar mile zaruri to nahi,

kyu rishta humara itna ajib hota hai,

kya bas yahi betiyo ka nasib hota hai ?



Papa ne jawaab diya …

Pyari bitiya,

Bahut chanchal bahut

Khushnuma si hoti hai BETIYA

Nazuk sa dil rakhti hai Masoom si hoti hai BETIYA

Baat baat par roti hai

Nadan si hoti hai BETIYA

Rehmat se bharpoor

Khuda ki nemat hai BETIYA

Ghar mehak uthta hai

Jab muskrati hai BETIYA

Ajeeb si taklif hoti hai

Jab dusre ghar jati hai BETIYA

Ghar lagta hai suna suna Kitna rula ke jati hai BETIYA

Khushi ki jhalak

Babul ki ladli hoti hai BETIYA

Ye hum nahi “RAB ” kehta hai. . .

Ke Jab main bahut khush hota hu toh janam leti hai “BETIYA”

Dedicated to all Girls!!



Babul ki ladli hoti hai BETIYA

Friday, November 15, 2013

Kumar Vishwash - भ्रमर कोई कुमुदिनी पर, मचल बैठा तो हन्गामा

भ्रमर कोई कुमुदिनी पर, मचल बैठा तो हन्गामा । हमारे दिल मे कोई ख्वाब, पल बैठा तो हन्गामा । अभी तक डूब के सुनते थे, सब किस्सा मोहब्ब्त का । मै किस्से को हकीकत मे, बदल बैठा तो हन्गामा ।


Kumar Vishwash – भ्रमर कोई कुमुदिनी पर, मचल बैठा तो हन्गामा


भ्रमर कोई कुमुदिनी पर,

मचल बैठा तो हन्गामा ।

हमारे दिल मे कोई ख्वाब,

पल बैठा तो हन्गामा ।

अभी तक डूब के सुनते थे,

सब किस्सा मोहब्ब्त का ।

मै किस्से को हकीकत मे,

बदल बैठा तो हन्गामा ।



Kumar Vishwash - भ्रमर कोई कुमुदिनी पर, मचल बैठा तो हन्गामा

Friday, November 8, 2013

WONDERFUL DEFINITIONS

husband and wife jokes


WONDERFUL DEFINITIONS :


SCHOOL

A place where Parents pay and children play


LIFE INSURANCE

A contract that keeps you poor all your life so that you can die Rich.


NURSE

A person who wakes u up to give you sleeping pills.


MARRIAGE

It’s an agreement in which a man loses his bachelor degree and a woman

gains her masters..


TEAR

The hydraulic force by which masculine willpower is defeated by feminine

waterpower.


CONFERENCE

The confusion of one man multiplied by the number present.


FATHER

A banker provided by nature


CRIMINAL

A person no different from the rest

….except that he/she got caught


BOSS

Someone who is early when you are late and late when you are early !!!!


POLITICIAN

One who shakes your hand before elections and your Confidence thereafter


DOCTOR

A person who holds your ills by pills, and kills you by bills.


:);):D;):)



WONDERFUL DEFINITIONS

Wednesday, November 6, 2013

Maybe I Do not SHOW But I Care

Maybe I Don't CRY But It Hurts!! Maybe I Won't SAY, But I Feel!! Maybe I Don't SHOW, But I Care!!


Maybe I Do not SHOW But I Care


Maybe I Don’t CRY,

But It Hurts!!!

Maybe I Won’t SAY,

But I Feel!!!

Maybe I Don’t SHOW,

But I Care!!!



Maybe I Do not SHOW But I Care

Sunday, November 3, 2013

C# - Basic Syntax

C# – Basic Syntax :


C# is an object-oriented programming language. In Object-Oriented Programming methodology, a program consists of various objects that interact with each other by means of actions. The actions that an object may take are called methods. Objects of the same kind are said to have the same type or, more often, are said to be in the same class.


For example, let us consider a Rectangle object. It has attributes like length and width. Depending upon the design, it may need ways for accepting the values of these attributes, calculating area and display details.


Let us look at an implementation of a Rectangle class and discuss C# basic syntax, on the basis of our observations in it:


using System;
namespace RectangleApplication

class Rectangle

// member variables
double length;
double width;
public void Acceptdetails()

length = 4.5;
width = 3.5;

public double GetArea()

return length * width;

public void Display()

Console.WriteLine("Length: 0", length);
Console.WriteLine("Width: 0", width);
Console.WriteLine("Area: 0", GetArea());



class ExecuteRectangle

static void Main(string[] args)

Rectangle r = new Rectangle();
r.Acceptdetails();
r.Display();
Console.ReadLine();



When the above code is compiled and executed, it produces the following result:



Length: 4.5

Width: 3.5


Area: 15.75

The using Keyword


The first statement in any C# program is:
using System;

The class Keyword


The class keyword is used for declaring a class.


Comments in C#


Comments are used for explaining code. Compilers ignore the comment entries. The multiline comments in C# programs start with /* and terminates with the characters */ as shown below:



/* This program demonstrates
The basic syntax of C# programming
Language */

Single-line comments are indicated by the ‘//’ symbol. For example,



}//end class Rectangle

Member Variables


Variables are attributes or data members of a class, used for storing data. In the preceding program, the Rectangle class has two member variables named length and width.


Member Functions


Functions are set of statements that perform a specific task. The member functions of a class are declared within the class. Our sample class Rectangle contains three member functions: AcceptDetails, GetArea and Display.


Instantiating a Class


In the preceding program, the class ExecuteRectangle is used as a class, which contains the Main() method and instantiates the Rectangle class.


Identifiers


An identifier is a name used to identify a class, variable, function, or any other user-defined item. The basic rules for naming classes in C# are as follows:


  • A name must begin with a letter that could be followed by a sequence of letters, digits (0 – 9) or underscore. The first character in an identifier cannot be a digit.

  • It must not contain any embedded space or symbol like ? – +! @ # % ^ & * ( ) [ ] . ; : ” ‘ / and \. However, an underscore ( _ ) can be used.

  • It should not be a C# keyword.


C# - Basic Syntax

Saturday, November 2, 2013

C# - Program Structure

C# – Program Structure :


let us look at a bare minimum C# program structure so that we can take it as a reference in upcoming articles.


C# Hello World Example

A C# program basically consists of the following parts:


Namespace declaration

A class

Class methods

Class attributes

A Main method

Statements & Expressions

Comments


Let us look at a simple code that would print the words “Hello World” :


using System;
namespace HelloWorldApplication

class HelloWorld

static void Main(string[] args)

/* my first program in C# */
Console.WriteLine("Hello World");
Console.ReadKey();



When the above code is compiled and executed, it produces the following result:


 



Hello World

Let us look at various parts of the above program:


  • The first line of the program using System; – the using keyword is used to include the System namespace in the program. A program generally has multiple using statements.

  • The next line has the namespace declaration. A namespace is a collection of classes. The HelloWorldApplication namespace contains the class HelloWorld.

  • The next line has a class declaration, the class HelloWorld contains the data and method definitions that your program uses. Classes generally would contain more than one method. Methods define the behavior of the class. However, the HelloWorld class has only one method Main.

  • The next line defines the Main method, which is the entry point for all C# programs. The Main method states what the class will do when executed

  • The next line /*…*/ will be ignored by the compiler and it has been put to add additional comments in the program.

  • The Main method specifies its behavior with the statement Console.WriteLine(“Hello World”);
    WriteLine is a method of the Console class defined in the System namespace. This statement causes the message “Hello, World!” to be displayed on the screen.

  • The last line Console.ReadKey(); is for the VS.NET Users. This makes the program wait for a key press and it prevents the screen from running and closing quickly when the program is launched from Visual Studio .NET.

It’s worth to note the following points:


  • C# is case sensitive.

  • All statements and expression must end with a semicolon (;).

  • The program execution starts at the Main method.

  • Unlike Java, file name could be different from the class name.

Compile & Execute a C# Program:


If you are using Visual Studio.Net for compiling and executing C# programs, take the following steps:


  • Start Visual Studio.

  • On the menu bar, choose File, New, Project.

  • Choose Visual C# from templates, and then choose Windows.

  • Choose Console Application.

  • Specify a name for your project, and then choose the OK button.

  • The new project appears in Solution Explorer.

  • Write code in the Code Editor.

  • Click the Run button or the F5 key to run the project. A Command Prompt window appears that contains the line Hello World.

You can compile a C# program by using the command-line instead of the Visual Studio IDE:


  • Open a text editor and add the above-mentioned code.

  • Save the file as helloworld.cs

  • Open the command prompt tool and go to the directory where you saved the file.

  • Type csc helloworld.cs and press enter to compile your code.

  • If there are no errors in your code, the command prompt will take you to the next line and would generate helloworld.exe executable file.

  • Next, type helloworld to execute your program.

  • You will be able to see “Hello World” printed on the screen.


C# - Program Structure

C # Environment

C # Environment 


The .Net framework is a revolutionary platform that helps you to write the following types of applications:


  • Windows applications

  • Web applications

  • Web services

The .Net framework applications are multi-platform applications. The framework has been designed in such a way that it can be used from any of the following languages: C#, C++, Visual Basic, Jscript, COBOL, etc. All these languages can access the framework as well as communicate with each other.


The .Net framework consists of an enormous library of codes used by the client languages like C#. Following are some of the components of the .Net framework:


  • Common Language Runtime (CLR)

  • The .Net Framework Class Library

  • Common Language Specification

  • Common Type System

  • Metadata and Assemblies

  • Windows Forms

  • ASP.Net and ASP.Net AJAX

  • ADO.Net

  • Windows Workflow Foundation (WF)

  • Windows Presentation Foundation

  • Windows Communication Foundation (WCF)

  • LINQ

Integrated Development Environment (IDE) For C#


Microsoft provides the following development tools for C# programming:


  • Visual Studio 2010/12 (VS)

  • Visual C# 2010/12 Express (VCE)

  • Visual Web Developer

The last two are freely available from Microsoft official website. Using these tools, you can write all kinds of C# programs from simple command-line applications to more complex applications. You can also write C# source code files using a basic text editor, like Notepad, and compile the code into assemblies using the command-line compiler, which is again a part of the .NET Framework.


Visual C# Express and Visual Web Developer Express edition are trimmed down versions of Visual Studio and has the same look and feel. They retain most features of Visual Studio. In this tutorial, we have used Visual C# 2010 Express.


You can download it from Microsoft Visual Studio. It gets automatically installed in your machine. Please note that you need an active internet connection for installing the express edition.


Writing C# Programs on Linux or Mac OS

Although the.NET Framework runs on the Windows operating system, there are some alternative versions that work on other operating systems. Mono is an open-source version of the .NET Framework which includes a C# compiler and runs on several operating systems, including various flavors of Linux and Mac OS. Kindly check Go Mono.


The stated purpose of Mono is not only to be able to run Microsoft .NET applications cross-platform, but also to bring better development tools to Linux developers. Mono can be run on many operating systems including Android, BSD, iOS, Linux, OS X, Windows, Solaris and UNIX.



C # Environment