|
Then enjoy this[^] quick update.
|
|
|
|
|
Pete O'Hanlon wrote: Then enjoy this[^] quick update.
I'd rather call it a hotfix
Greetings - Jacek
|
|
|
|
|
I'd rather call it lazy. This is something you google.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
Read an introductory text on object oriented programming, it will define these concepts and answer your question far better than some forum posts here.
|
|
|
|
|
Polymorphism by inheritance can be done by defining virtual methods in a base class and overriding those methods in the derived class giving each derived class it's own implementation something like this
public class car
{
public car()
{}
public virtual void TurboBoost()
{
Console.WriteLine("Car speeding up.");
}
}
public class SportsCar:car
{
public SportsCar()
: base()
{ }
public override void TurboBoost()
{
Console.WriteLine("Sportscar is speeding up....");
}
}
...and I have extensive experience writing computer code, including OIC, BTW, BRB, IMHO, LMAO, ROFL, TTYL.....
|
|
|
|
|
So do you think Overriding is polymorphism.
As I know polymorphism is something having different forms of the same thing (e.g. Function Overloading).
But in case of overrideing, function from parent class is obsoleted by the function of child class.
there is no way to call parent class function from the object of Child.
This is my confusion point because I have read around 5-6 books and many of articles online for this confusion but some times I got the same answer as yours and some times different that's why I have asked it here.
But everybody except you is demotivating me for asking this simple question by the way thanks for the reply
|
|
|
|
|
Ankit Rajput wrote: there is no way to call parent class function from the object of Child
Actually...
public class Animal
{
public virtual void MakeNoise()
{
MessageBox.Show("Blarg!");
}
}
public class Dog : Animal
{
public override void MakeNoise()
{
base.MakeNoise();
MessageBox.Show("Bark!");
}
}
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
(new Dog()).MakeNoise();
}
}
And just because you are "obsoleting" one of the functions does not mean it is not polymorphism. There are other behaviors and properties that probably got inherited. Not to mention you still get the ability to "morph":
var animals = new List<Animal>();
animals.Add(new Dog());
animals.ForEach((animal) => animal.MakeNoise());
Fixign now. | But who's fixing the fixign? |
|
|
|
|
|
1. Yes
2. Easily
This is very basic and can be Googled with little effort, hence my vote of 1.
|
|
|
|
|
|
Thanks everybuddy...
I got my answer from the summary of all the post for this question.
Regards
Ankit
|
|
|
|
|
new AjaxUpload("#fuCondition", {
action: servicesPath + 'Handlers/FileUpload.ashx?t=0&BRH_ID='+ $("#BRH_ID").val()+"&USR_ID="+ $("#USR_ID").val()+"&DeedOffice="+ $("#DeedOf").val(),
name: 'userfile',
data: {},
autoSubmit: true,
responseType: false,
onChange: function (file, extension) {
$("#fuCondition").hide();
$("#Uploading").show();
},
onSubmit: function (file, extension) {
if (!(extension && /^(rtf|zip)$/.test(extension))) {
alert('Error: file type not allowed.');
return false;
}
this.disable();
},
onComplete: function (file, response) {
$('#file_name').val(file);
if (response.toLowerCase() != 'true') {
$('#status').hide();
setTimeout(3000, 6000);
$("#Uploading").hide();
$("#fuCondition").show();
}
else if (response.toLowerCase() == 'false')
$('#status').html('error!, file not saved');
else
$("#status").html(response);
}
});
How to clicking twice when you are using ajaxupload? and do you avoid it from taking default values of textbox
|
|
|
|
|
Here's a big hint. That language - while it's got curly braces and semi-colons, it's JavaScript. Now, take a look at the name of this forum and ask yourself if this really is the optimum location to post this question.
|
|
|
|
|
thanks pete, bt the was no need for you to be rude, u should have just pointed out the mistake
|
|
|
|
|
dbongs wrote: u should have just pointed out the mistake
I did. I don't have the time, inclination, or patience to coddle people who can't even be bothered to pick the correct forum.
|
|
|
|
|
ha ha hah hah hic - he though THAT was rude, wait till he post a programming question in the Lounge. I thought you were very restrained and most polite.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Posting anything in the Lounge is a dangerous game ...
|
|
|
|
|
Mycroft Holmes wrote: wait till he post a programming question in the Lounge.
...or until *I* see it here...
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
Pete
I am sorry if i have offended you....please accept my apology, and thanks for your 1st msg, it encouraged me to get my error working.
|
|
|
|
|
Excellent attitude. Good for you, and a 5 for yourself.
|
|
|
|
|
dbongs wrote: thanks pete, bt the was no need for you to be rude, u should have just pointed
out the mistake
0) Yeah, there evidently is. First, you posted your question in the wrong forum. How anyone could miss the great-big C# at the top of the page is freakin' beyond me. If this is an example of your attention to detail, you're going to fail as a programmer, and you may as well find something else to do with your time.
1) Yeah, there evidently is. We spend all day in here answering questions for people, and when people ignore the possiblity that our answers to their question might have actually helped someone else if it had just been posted in the correct forum, it kinda ticks us off because now, we have to field the question AGAIN.
2) Yeah, there evidently is. Using text-speak is one of the fastest ways I know of to tick off the users here. If you can't take the time to type out a complete freakin' word, why should we take the time to answer your question?
3) Using the cute little angry smilie is beyond pointless. That in and of itself is what prompted me to respond to your statement.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
dbongs wrote: u should have just pointed out the mistake
He just did.
|
|
|
|
|
You should ask this question in a Jquery forum.
|
|
|
|
|
thanks Bob, i posted it on the Javascript forum.
|
|
|
|
|
Hello!
I want to know if file is being used by another process and wait until it's free.
I'm using the following code:
public static bool FileInUse(string path
{
bool blnReturn = false;
FileInfo file = new FileInfo(path);
System.IO.FileStream fs;
try
{
fs = System.IO.File.Open(file.FullName, FileMode.OpenOrCreate, FileAccess.Read, FileShare.None);
fs.Close();
}
catch
{
blnReturn = true;
}
return blnReturn;
}
) ;
But, instead of returning a value, the programm is crashing in
fs = System.IO.File.Open(file.FullName, FileMode.OpenOrCreate, FileAccess.Read, FileShare.None);
What is wrong here?
|
|
|
|
|
Are you running in a debugger? They will often notify you of exceptions even inside a catch. If you run this application on its own that should work, though it has a couple of issues (you will create the file if it doesn't exist, and you should be catching the specific exception you are looking for if you are just trying to find if the file is locked by another app).
|
|
|
|