|
I think regular expressions are about to become your new best friend.
Just because we can; does not mean we should.
|
|
|
|
|
I don't think reg expressions become anyones best freind. I see it more like an annoying tenant that won't move out, yet gives you lots of money at the end of the month. If you see what i mean.
My current favourite word is: Bacon!
-SK Genius
|
|
|
|
|
what is the main class in C#.net from which all the classes are
derived?
please someone answer my question i am new to C#.thanks
aayzgroup
|
|
|
|
|
Please, don't fill up the forum with lots of simple questions, you could have used one post to ask all of them.
Also, you can easily use google to find the answers you are looking for, and it would probably be quicker as well.
Since you are asking these questions i recommend that you buy a beginners book, and if you don't want to spend any money, start working through a set of online tutorials - there are plenty available.
My current favourite word is: Bacon!
-SK Genius
|
|
|
|
|
SK Genius wrote: don't fill up the forum with lots of simple questions, you could have used one post to ask all of them.
It depends on your preference. I prefer each thread to contain only one question.
|
|
|
|
|
Yep, I was gonna say that too, but you know, when you're preparing for an interview where you plan to say you know a language you don't know... it's best not to waste too much time on that...
|
|
|
|
|
A@YZ wrote: what is the main class in C#.net from which all the classes are
derived?
If by "main" you mean "base" then it is object . All classes are, eventually, derived from object .
|
|
|
|
|
"In the beginning there was the class , and the class was object ."
|
|
|
|
|
PIEBALDconsult wrote: "In the beginning there was the class, and the class was object."
"6. Then Hejlsberg said, "Let there be an expanse in the midst of the types, and let it separate the types from the types." 7. Hejlsberg made the expanse, and separated the types which were in the heap from the types which were outside the heap; and it was so. 8. Hejlsberg called the expanse ValueType. And there was evening and there was morning, a second day."
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Simply brilliant.
Cheers,
Vikram.
The hands that help are holier than the lips that pray.
|
|
|
|
|
what is meant by Interface in C#?
please someone answer my question i am new to C#.thanks
aayzgroup
|
|
|
|
|
Interfaces in C# are a way of abstraction. For instance lets say we create an interface called IAnimal. The IAnimal interface defines a contract that all classes which implement the IAnimal interface must abide by. The IAnimal interface defines several properties such as int NumberOfLegs, bool HasFur and so on. Now you want to create a calls that implements this interface you would do so by
public class Dog : IAnimal
{
}
When you implement the IAnimal interface you MUST implement all of the items the interface defines so you would need to do this:
public class Dog : IAnimal
{
public int NumberOfLegs
{
get { return 4; }
}
public bool HasFur
{
get { return true; }
}
}
now you can not only refer to the instance of the Dog class as a Dog but you would also refer to this object as an IAnimal.
Dog dog = new Dog();
int legs = dog.NumberOfLegs;
or
IAnimal animal = new Dog();
int legs = animal.NumberOfLegs;
Hope this helps.
You can always find more at www.johnnycantcode.com
Scott "Johnny" Smith
www.johnnycantcode.com
|
|
|
|
|
|
Multiple Inheritance is possible in C# are not?
please answer my question i am new to C#.thanks
aayzgroup
|
|
|
|
|
|
A@YZ wrote: Multiple Inheritance is possible in C# are not?
Yes, or... no... or... what?
Multiple inheritance is not possible in C#.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Multiple Inheritance is possible in C# are not?
aayzgroup
|
|
|
|
|
|
Try looking here[^]
My current favourite word is: Bacon!
-SK Genius
|
|
|
|
|
Hello all,
I have a problem adding a button to a flowlayoutpanel control at a specific location in flowlayoutpanel. When I try to add a 'Button', it automatically adds at the starting location(left top)of 'flowlayoutpanel'. Even if I specify the location for the 'Button' it doesn't work.
Button btnPanelLoc = new Button();
btnPanelLoc.Text = "Loc2";
flowLayoutPanel1.Controls.Add(btnPanelLoc);
Point p = new Point();
p.X = flowLayoutPanel1.Left + 75;
p.Y = 400;
btnPanelLoc.Location = p;
This didn't help. Also I tried this option which didn't work either.
Button btnPanelLoc = new Button();
btnPanelLoc.Text = "Loc1";
flowLayoutPanel1.Controls.Add(btnPanelLoc);
btnPanelLoc.Left = flowLayoutPanel1.Width - 150;
btnPanelLoc.Top = flowLayoutPanel1.Height - 150;
Both ways it adds the button to the beginning of flowlayoutpanel instead of adding the 'Button' at a specific location.
Any Help greatly appreciated.
Thanks,
Enrique.
|
|
|
|
|
The FlowLayoutPanel is moving the control back to 3,3 (top-left) so no matter where you try to place it, the panel will put it back. If you add a second button that will go to the right of the first, and if you add another that will go to the right of... and so on until you reach the edge of the panel when it starts on the next line.
I've not really used the FlowLayoutPanel before, so i'm not sure what you can do about it, why not use a regular panel?
My current favourite word is: Bacon!
-SK Genius
|
|
|
|
|
I created a custom control textbox in WinForm which have another value field called "fullValue" which is a little different than the .text value. Is there a way where I can make it to where when I mouse over this textbox, it show fullValue as a tooltip?
Any help would be highly appreciated, thanks in advance!
|
|
|
|
|
Well, if you check what events are available, you will see MouseEnter and MouseLeave for when the mouse moves over the control in question.
So in the MouseEnter event you would have this.Text = this.fullValue; or something and in MouseLeave i guess you would restore the text.
My current favourite word is: Bacon!
-SK Genius
|
|
|
|
|
My question is related with VBScript.
But i didn't saw any topic with that one.
I have a small problem with a script.
Used this command : ret=objShell.run (strCommand ,0 ,true). Where strCommand runs 7-zip to do an archive. The problem appears if some files are in use by another process. 7-zip return and error code and the program stops there. I want the program to continue the execution because even with this error.
If I put the last parameter false the problem is that that the program doesn't wait for the archive to be done.
I searched for some hours on the net but didn't find anything so I'm a little desperate.
I really appreciate any help,
Thanks
|
|
|
|
|
Why don't you use a GZipStream and cut 7zip out altogether?
Scott P
"Run for your life from any man who tells you that money is evil. That sentence is the leper's bell of an approaching looter." --Ayn Rand
|
|
|
|