|
Hi,
I am having a class which extends NameValueCollection Class
class Mynvc:NameValueCollection
{
public Mynvc(Mynvc obj)
{
//What should i do here to copy the entire obj
}
}
Mynvc myobj=new Mynvc();
myobj.Add("One",1);
myobj.Add("Two",2);
myobj.Add("One",3);
Mynvc temp=new Mynvc(mobj);
This is what i want . How can i do this.
|
|
|
|
|
<code> class Mynvc: NameValueCollection
{
public Mynvc(NameValueCollectionTwo toCopyFrom)
{
for (int i = 0; i < toCopyFrom.Count; i++)
{
this.Add(toCopyFrom[toCopyFrom.Keys[i]], toCopyFrom.Keys[i]);
}
}
public override void Add(string name, string value)
{
base.Add(name, value);
}
}</code>
does this help you?
Visual Studio can't evaluate this, can you?
public object moo<br />
{<br />
__get { return moo; }<br />
__set { moo = value; }<br />
}
|
|
|
|
|
Hi Joon,
Thank you Very much for your reply.
Instead of storing string type value can i use any other type like long or
double for storing value.if so , how should i define my add method.
public void Add(sting key,double val)
{
Base.Add(key,val);
}
how can i do this.
Sakthi
|
|
|
|
|
if this is what you want, then you should make a custom class. You can't EXTEND a class, and change things at the same time, at least not something like changing the type of a member into a completely different type.
I suggest you create your own collection that can work with strings and doubles.
Visual Studio can't evaluate this, can you?
public object moo<br />
{<br />
__get { return moo; }<br />
__set { moo = value; }<br />
}
|
|
|
|
|
Hi Joon,
Thanks for your reply.
Sakthi
|
|
|
|
|
Hi Friends,
How can i Increase or Decrease of a color?
suppose i have a label whose backcolor is black.
Label1.Backcolor=Color.Black;
how can i increase or decrease the color of label1?
pls help me.
thanks.
|
|
|
|
|
You could create and assign a new Color using the static Color.FromArgb method whereby the method arguments are based on your current color (accessible via A , R , G and B properties).
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Hello,
Maybe the "KnownColor" enumeration can help you in this case.
System.Drawing.Color basecolor = System.Drawing.Color.Black;
System.Drawing.KnownColor tempcolor = basecolor.ToKnownColor();
int i = (int)tempcolor;
System.Drawing.KnownColor newtempcolor = (System.Drawing.KnownColor)(i+1);
System.Drawing.Color newcolor = System.Drawing.Color.FromKnownColor(newtempcolor);
You have to add some checks if it's valid!
Hope it helps!
All the best,
Martin
|
|
|
|
|
|
Friends,
I am working on ASP.NET 1.1 with C# Domain..
I want to use my project using Visual Source Safe (VSS)...
i have Visual Studio (4 Cd's Pack)..I have 5 PC's , Which i want to connect in such a manner like.. i will keep my project on server and configure through VSS, so that other programmers can able to use it...
so plzzz can any body tell me how to install it on server and client pc...??
Thanks & Regards
Ahuja
grewagvdsvvadfbvb dfbdfbdg
|
|
|
|
|
You have an election between your pcs, to decide who should be the new Server of VSS. You insert the disk, and press install!
Make sure to install the server controls... on the server, and the client controls... on the client!
...that's actually all you need to do. It might be necessary to go to Tools > options > source control, and change it from the VSS HTTP plugin to the regular one.
Visual Studio can't evaluate this, can you?
public object moo<br />
{<br />
__get { return moo; }<br />
__set { moo = value; }<br />
}
|
|
|
|
|
Hi
I am developing windows application using C#..In my application i am using Environment.Exit()..Now my application exited..
But my another application i am developing windows mobile 5.0 application using .NET Compact framework 2.0 C#.NET .The environment.exit() and application.exit()also not supported.I have used this.close() and this.dispose()...application not exit.I don't know how to exit my application...please anybody help me...
Finally i am using System.Diagnostics.Process.GetCurrentProcess().CloseMainWindow(); This one also not closing..
Can i use System.Diagnostics.Process.GetCurrentProcess().Kill(); that kill method?..Is it correct way to exit()?..
If anybody knows please help me...
Bye
|
|
|
|
|
Have you tried Application.Exit?
Visual Studio can't evaluate this, can you?
public object moo<br />
{<br />
__get { return moo; }<br />
__set { moo = value; }<br />
}
|
|
|
|
|
Yes, already tried Application.Exit()...that one Not exiting..but Application hanging..
I tried this.close() and this. dispose() methods..My application closing, but background still running..not exiting...Do you know any exiting methods supported in compact framework?..please help me..
Thanks in advance....
Bye
|
|
|
|
|
I suggest you read this: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1410298&SiteID=1
Visual Studio can't evaluate this, can you?
public object moo<br />
{<br />
__get { return moo; }<br />
__set { moo = value; }<br />
}
|
|
|
|
|
Ok Thanks joon...I will read the forum..If any doubt i will ask again...Thanks a lot..
Bye
|
|
|
|
|
it seems like you're not the only one with the problem
I don't know CF myself, but I hope I could help.
Good luck.
Visual Studio can't evaluate this, can you?
public object moo<br />
{<br />
__get { return moo; }<br />
__set { moo = value; }<br />
}
|
|
|
|
|
Hi all,
i am making a windows based application, here i am using a DataGridView(of C#2.0)
here i wanna add a label control in my GridView,
i have to fill a colomn say(LabeledData) with a Label Control For each row,
hope u got me.
please help me solving this problem
bye byes,
thnx in advance
prashanth
|
|
|
|
|
Hi Friends.
Yesterday I have developed a little software at my home and today I have made some changes at our office. but whenever I launch the project it shows only previous designed work. even break point is not working.
The message is appearing:
** The source code is different from the original version **
Visual Studio 2005 is installed at my home and also our office. ;,,(
Kindly help me. and give me solutions to correct said problem.
Thank you
(Riaz)
|
|
|
|
|
When you move the source between machines I'm guessing you are just copying the entire folder structure (with the built assemblies and all). That being the case then there is the possibility that Visual Studio is getting confused about what actually needs to be built. So, after a move ensure that you go to the Build menu and "Rebuild All".
|
|
|
|
|
|
Thank you Mr. Colin Angus Mackay
now it works.
|
|
|
|
|
|
Hey!
Could anyone tell me the difference between a regular listview and a viertual listview?
How do I get a virtual listview?
|
|
|
|
|
How can i using xmlDOM concept in aspx.cs page.i need the sourcecode also.............
|
|
|
|