Feb 05

.Net Properties Question asked and my Answer

C# | My Inbox 28 Comments »

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Hi,

Can any body guide me whats the exact use or *Properties* (get and set) in
C#.

I know how to declare but not sure how to use it. Please guide.

Thanks,



[KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tags:

Feb 05

A Question from a reader and my Answer

C# | Design Patterns | My Inbox 4 Comments »

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Greetings!

I have a hierarchy of classes, with an abstract class that defines the
method Read() at the top of it. Each class in the hierarchy has a
Read() method, and I need to be able to call Read() from the highest
possible level of the hierarchy and get the correct Read() function.

Public class AbstractClass 
{
abstract void Read();
}

Public class A : AbstractClass
{
public override void Read();
}

Public class B: A
{
public override void Read();
}

The compiler complains that A has no overridable function named Read().
Is it not possible to do this?

Thank you very much.

RobR


[KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tags:

Mar 31


[KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tags:

Dec 23

SHOES ARE TRACED OUT (Funny)

My Inbox 50 Comments »

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

 

Hi, These days em not getting time to write programming articles because of my study as well as tough job timings. So most of my post will belongs to MyInbox category. In this category I post some emails which I get from my differnt friends. The following email is from my friend zafar Iqbal. I hope that you will enjoy it.

 

SHOES ARE TRACED OUT


The pair of shoes which was thrown
at Mr. Bush in Iraq has links to Pakistan, said a statement
from Pentagon. They have the following proofs:
i) The journalist had visited Pakistan earlier this year. 
There he was inspired by the shoe throwing at former 
CM Arbab Ghulam Rahim and Sher Afghan Niazi. 
 
ii)  He received his training of throwing shoes by a Pakistan 
based Jihadi organization.

iii) The DNA sample of leather has revealed that the animal
whose skin was used for manufacturing the shoe had traces 
of grass which is grown in North of Pakistan and this skin was
collected by a Jihadi organization on Eid-ul-Adha this month.
 
Hearing this, President Asif Ali Zardari and Prime
Minister Yousaf Raza Gilani have decided to ban the Jihadi
organization and launched a country wide crackdown against
all the cobblers in Pakistan.


[KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tags:

Dec 23

That's Life

My Inbox 104 Comments »

Currently rated 4.0 by 1 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

 

 Hi, These days em not getting time to write programming articles because of my study as well as tough job timings. So most of my post will belongs to MyInbox category. In this category I post some emails which I get from my differnt friends. The following email is from my friend Syed Irtaza ali. I hope that you will enjoy it.

 

God created the donkey


and said to him.
"You will be a donkey. You will work un-tiringly from sunrise to sunset
carrying burdens on your back. You will eat grass,
you will have no intelligence and you will live
50 years."
The donkey answered:

"I will be a donkey, but to live
50years is much. Give me only 20years"
God granted his wish.

....................................................................
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


God created the dog



and said to him:
"You will guard the house of man. You will be his best Friend.
You will eat the scraps that he gives you and
you will live
30years.
You will be a dog. "

The dog answered:

"Sir, to live
30years is too much,give me only15 years.
" God granted his wish.
........................................................................
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

God created the monkey


and said to him:
"You will be a monkey. You will swing from branch to branch doing tricks.
You will be amusing and you will live

20
years. "
The monkey
answered:

"To live
20years is too much, give me only 10years."
God granted his wish.

....................................................................

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Finally God created man...


and said to him:
"You will be man, the only rational creature on the face of the earth.
You will use your intelligence to become master over all the animals.
You will dominate the world and you will live
20years."

Man responded:

"Sir, I will be a man but to live only

20
years is very little,
give me the
30years that the donkey refused,
the
15years that the dog did not want and
the
10years the monkey refused.
" God granted man's wish
................................................................

And since then, man lives

20
years as a man ,

marries and spends

30
years like a donkey,
working and carrying all the burdens on his back.


Then when his children are grown,
he lives
15years like a dog taking care of the house
and eating whatever is given to him,


so that when he is old,
he can retire and live
10years like a monkey,
going from house to house and from one son or
daughter to another doing tricks to amuse his grandchildren.


That's Life.



[KickIt] [Dzone] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Tags: