|
squattyarun wrote: e.abc()
Nah.. It would be d.abc()
Since the in Class B.. the function of Class A is overriden.
I hope I am right
------------------------------------------------------------------
Life would have been much easier if I had the source-code!!
|
|
|
|
|
If i am not mistaken, ((A)e).abc();
But I got to wonder, do you ever learn anything from the questions you posted, or do you just want the answer of each question and that's it?
|
|
|
|
|
darkelv wrote: do you just want the answer of each question and that's it?
That would seem to be the case. She doesn't seem to be willing to do anything to help herself. All I can conclude is that she's either lazy or unwilling to think for herself.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Pete O`Hanlon wrote: All I can conclude is that she's either lazy or unwilling to think for herself
What I don't get is that the questions are often so devoid of meaning that it's hard to believe she's actually writing something with this stuff. It just seems to be random.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
darkelv wrote: If i am not mistaken, ((A)e).abc();
I am afraid that you are. When calling a virtual method, the actual type of the object is used, and casting the reference to a different type doesn't change the actual type of the object.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
Sonia Gupta wrote: how can i call the the function of class a , using the object of class b
What have you tried?
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Why do you start a new thread, instead of continuing in the same thread?
Sonia Gupta wrote: how can i call the the function of class a , using the object of class b
You can't.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
At this point, I'm assuming that you're trolling. I can't think of any other explanation for the stream of posts that just keep coming, regardless of how many people urge you to learn to do some basic research.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: At this point, I'm assuming that you're trolling. I can't think of any other explanation for the stream of posts that just keep coming, regardless of how many people urge you to learn to do some basic research.
I would have to agree with you on this one. Almost all of the posts are trivial in nature at best and all could have been answered by reading a single introductory book to programming and .NET.
Given the large amount of questions posted like this in such a short period of time (843 in 6 months, at last count) and the number of people that have responded by actually providing an answer and/or telling her to go out and pick up said introductory book, any way to ban this account or at least put her on probabtion of some kind? (It might not be worth it since she could always just open another account, but it might serve to get the message across and would be one small step to help everyone here not waste time cralwing through these messages.)
By the way, according to her profile, her homepage is the Visual Basic/VB.NET Fourm.
|
|
|
|
|
|
Hey guyz,
I am currently learning C# and wanna know how to change the look of the form?
For example.. See this pic..
http://img206.imageshack.us/img206/6296/gomvx6.png
So How to make forms like that in C#?
Thanks.
------------------------------------------------------------------
Life would have been much easier if I had the source-code!!
|
|
|
|
|
You can try this[^] (comes with a video[^]).
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Thanks for the links mate.. Will try them out
------------------------------------------------------------------
Life would have been much easier if I had the source-code!!
|
|
|
|
|
Hi,
I need your help for some sporadic problem that I got during starting new process (C# 1.1).
when I 'm starting new process on remote machine (using remoting), my process starts properly and launching an external application, but from some strange reason it does not exit , and the CPU is growing almost to 98% despite the fact that the application I run via this process finished its job.
Please see my code below:
Code: ( text )
proc = new Process();
proc.EnableRaisingEvents = true;
proc.StartInfo.FileName = m_AppExeName;
proc.StartInfo.WorkingDirectory = m_AppFolderName;
proc.StartInfo.UseShellExecute = false;
proc.Start();
10x,
Lior
|
|
|
|
|
Hello,
Two Point's that come in my mind:
.)
Are you holding the reference to the Process all the time or are you disposing it proper.
You could use a 'using'-block for that:
using (Process proc = new Process())
{
proc...
}
.)
Why are you setting the 'EnableRaisingEvents' to 'true'.
Are you handling the 'Exited' event somewere?
All the best,
Martin
|
|
|
|
|
Thanks for your quick response
I'm holding a reference to this Process indeed.
In addition, I'm using the 'Exited' event later in the code in order to get notified
when my process finished its job (notify the client).
Do u think it can cause this problem??
Thanks,
Lior
|
|
|
|
|
liorjj wrote: Do u think it can cause this problem??
I'm really not sure about that.
Give it a try without holding the process and the delegate.
All the best,
Martin
|
|
|
|
|
hi.
i want to send fax with C# and windows XP.
what's the best way to send fax ?
|
|
|
|
|
Add a reference of FaxCom.dll in your project...I haven't used it but i think u will find all the required methods and classes in the dll...Try google
Koushik
|
|
|
|
|
|
if i declare the function in the class as public static .i now no need to create the object , like
class abc
{
public static void abc1()
{
}
}
class def
{
void abcbd()
{
abc.abc1();
}
}
what will happen if i declare the class as static?
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Sonia Gupta wrote: what will happen if i declare the class as static?
Open www.google.com[^].
Type "C# static class".
Hit the "Google Search" button.
Click on first link.
Read second paragraph.
[ My Blog] "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
In this case the result will be the same. Because when you declare a method static in a non-static class you can call it without creating new object. If you declare class static, you're declaring only static methods inside... For more search google...
Visit my blog at http://dotnetforeveryone.blogspot.com
|
|
|
|
|
I have to make a clarification in the following funciton.
public SqlParameter Parameter<T>(string parameterName, DbType parameterType, T value, ParameterDirection direction)
{
}
here in the funciton <T> is declared after the funciton name.
if in the funciton parameters , i declare string value inspite of T value.
will it produce any sort of less effeciency.
I mean What's the importance of this <T> in the funciton?
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Sonia - when I originally posted the snippet with the <T> parameter in, I explained to you that this was a generic. Please take a look at google and see what you can find out. When you've had a look, feel free to come back and ask questions, but this question is answered in the basics of using generics.
CodeProject is not a programming tutorial. It is not here to remove the need for you to buy a book or two. In little over 6 months, you've posted approximately 835 questions and follow up questions. Doesn't this tell you that you could get some help from other sources?
I would suspect that most people on the forums are like me, and buy books and use google a lot. These should be your first port of call EVERY TIME.
Deja View - the feeling that you've seen this post before.
|
|
|
|