|
|
THANKS!!!
That is perfectly what I needed.
Thank you Ankita.
|
|
|
|
|
HI, I am new to c# programming. How can I get a simple menu system? I am using visual c# 2005. I only want a print, new document, open docunment, save document and help button, how can I do this. Thank you in advance.
|
|
|
|
|
1. Add ToolStripContainer (from Toolbox) to your form.
2. Set toolStripContainer.Dock = All.
3. Add MenuStrip (from Toolbox) to the top of the toolStripContainer.
4. Select menuStrip and type captions for your menu items.
5. Select menu item and add handler to its Click event.
6. Repeat step 5 for all menu items.
|
|
|
|
|
using System;
class test
{
private static int add(int x,int y)
{
return x+y;
}
public int calling(int x, int y)
{
int k;
test obj=new test();
k=obj.add(x,y);
return k;
}
}
class now
{
public static void Main()
{
int sum,x,y;
Console.WriteLine("enter x -->> ");
x=int.Parse(Console.ReadLine());
Console.WriteLine("enter y -->> ");
y=int.Parse(Console.ReadLine());
test obj1=new test();
sum=obj1.calling(x,y);
Console.WriteLine("the value is --> {0}",sum);
}
}
|
|
|
|
|
Define "not working."
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
1. You don't need to create an instance of class test to use the add function, since add is a static function.
int sum = test.add(1, 7);
If the add function was not a static function, you would need to create an instance of test:
test myTest = new test();
int sum = myTest.add(1, 7);
2. the way you have it coded, the calling function is useless. You may have intended to make calling static, not add.
Review static objects in classes.
|
|
|
|
|
the method add and the entry point method main() are in different classes so an object will be required to call add. not exactly an object but add will be called using the class name instead of the object name. further the add is a private method and it is being called through the public method calling. now method calling is also in a different class from the class in which entry point is. now to use calling we have to create an object but it is not working. i don't know why. please look at it once more.
|
|
|
|
|
It doesn't work because you're calling static method add() using object instance. You needn't create object to call add() method:
public int calling(int x, int y)
{
return add(x,y);
}
And you even needn't create object to sum up your numbers:
public static void Main()
{
Console.WriteLine("enter x -->> ");
int x = int.Parse(Console.ReadLine());
Console.WriteLine("enter y -->> ");
int y = int.Parse(Console.ReadLine());
int sum = test.add(x,y);
Console.WriteLine("the value is --> {0}",sum);
}
|
|
|
|
|
Hello, I'm implementing drag drop functionality from a RichTextBox to a TextBox (Works Perfect!!!) When I make RichTextBox read only it doesnot work. Its my requirement to set the RichTextBox to be read only.
Any Clue???
Thanks in Advance,
Best Regards,
Rizwan Ahmed.
|
|
|
|
|
What is the syntax to embed a dictionary within another dictionary?
Dictionary<string, string=""> dicText = new Dictionary<string, string="">();
|
|
|
|
|
Umm, how about this:
Dictionary<string, Dictionary<string, MyClass>> dict = new Dictionary<string, Dictionary<string, MyClass>>();
Logifusion[^]
|
|
|
|
|
thanks dude. got this far, but now how do i insert into the 1st and 2nd respectively?
dict.add("afdfs", ?)
|
|
|
|
|
Well, in the embedded one you have to create a dictionary.
dict.Add("key1", new Dictionary<string, myclass="">());
dict["key1"].Add("key2", new MyClass(1234));</string,>
Logifusion[^]
|
|
|
|
|
don't worry I know how to do it.
dict.add("asdfad", dicC.add("asdsfa","asdf") thanks anyway
|
|
|
|
|
Hi everybody, I need to use two buttons in one DataGrid.
How can I give to each one a specific action to do?
Anybody has an idea?
Thanks,
Oren,
|
|
|
|
|
U must add to template buttons
and than add the events for them
|
|
|
|
|
I'm trying to use DLL created in visualC#.net2005 in Crystal Report ...
How can i do that ?
thanks for help
bebo
|
|
|
|
|
CSAML - Finally things are going to get easier!
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Repost from the Lounge from several weeks ago.
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
My bad. The Lounge gets littered with so much noise, my trips there have been few and far between lately. Sorry about that, Ed.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Not a problem.
In fact Link2006 has been away for a while so there hasn't been that much rubbish, he did appear in the last few days but got beaten away by the usual crowd.
As of how to accomplish this I wouldn't have a clue at the moment and I'm too lazy to google it
|
|
|
|
|
Wee! I've been wondering how I could turn 4 lines of readable code into a book of cryptic unreadable crap! This is just what the doctor ordered! Can I get kool-aid with that?
Correct me if I'm missing something here, but where is the benefit of trading curly braces for an endless parade of XML tags? Unless there's a tool out there that craps out all that XML, which I doubt Petzold would endourse because it looks like he's not a big fan of code generation, then CSAML will take 10 times as long to produce code by hand.
If the current C# syntax is gone in '08 to be replaced with this mess, I guess I'll be grudgingly going back to Java.
|
|
|
|
|
© Charles Petzold, April 1, 2006
|
|
|
|
|
Is this a joke?
How is that utterly unreadable nonsense going to make anything at all easier?
|
|
|
|