|
thank you for answer,but i have another question
for example i have 2 forms,in the first form i have a button that click this button the form2 has shown
but i need while form2 is show another form of form2 does'nt show!and if form2 is minimized and show when i click button windows sate of form2 was normal!
please help me ?
|
|
|
|
|
Hi i am inheriting two interfaces A, B which has a method with common name called codeproject. When i am trying to call that method which interface method does it call? or how can we call a patricular method.
interface A
{
public void codeproject();
}
interface B
{
public void codeproject();
}
public class code : A, B
{
}
code c = new code();
c.codeproject() // which method is it calling ? what do i need to do call a particular method?
Santhapur
|
|
|
|
|
neither as the codeproject method is implemented in the class, not the interface.
you can implement each interface explicitly if you wish by using
public class code : A, B
{
void A.codeproject()
{
}
void B.codeproject()
{
}
}
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
what if we call like
code c = new code();
c.Codeproject(); which one does it call?
|
|
|
|
|
I think you are misunderstanding interfaces. An interface has no implementation.
c.CodeProject simply calls the method CodeProject() in the class code - nothing is ever 'called' in an interface.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
Ok Thanks I got you..
Santhapur
|
|
|
|
|
Try this and see if the previous answer makes any more sense:
using System;
interface IA
{
<code>
void CodeProject();
}
interface IB
{
<code>
void CodeProject();
}
public class Code : IA, IB
{
<code>
public void CodeProject()
{
Console.WriteLine("This is the CodeProject() method.");
}
}
class Program
{
static void Main(string[] args)
{
Code c = new Code();
c.CodeProject();
}
}
A couple of quick notes:
Interfaces are named with a leading letter "I", by convention (for example, IDisposable).
Methods defined in interfaces are automatically public. You cannot use the public modifier in the interface/method definition.
Enjoy,
Robert C. Cartaino
|
|
|
|
|
Oops, too slow. Already answered...
|
|
|
|
|
Hi all. Is it that i am using VS .Net 2003 that there is no method to clear a list box once it is populated. I need to clear the list Box but every time i attempt using the method Clear() from Class ListControls, i get an error. please help.
Wamuti: Any man can be an island, but islands to need water around them!
Edmund Burke: No one could make a greater mistake than he who did nothing because he could do only a little.
|
|
|
|
|
Hi Wamuti,
Try using the following line of code if it is a Bound ListBox:
<br />
this.listBox1.DataSource = null;<br />
For Unbound ListBox:
<br />
this.listBox1.Items.Clear()<br />
I hope this would be helpful.
John Adams
ComponentOne LLC.
www.componentone.com
modified on Thursday, September 4, 2008 10:33 AM
|
|
|
|
|
I will get back since im abit far from my codes.
Thanx alot.
Wamuti: Any man can be an island, but islands to need water around them!
Edmund Burke: No one could make a greater mistake than he who did nothing because he could do only a little.
|
|
|
|
|
What is the difference between;
Convert.Int32(myVariable)
Int32.Parse(myVariable)
(int)myVariable
Best Regards...
|
|
|
|
|
The former invokes a specific overload of the latter.
/ravi
|
|
|
|
|
Convert.ToInt32 will attempt to convert any type so long as a converter exists.
Int32.Parse will only attempt to convert a string.
(int) is an explicit cast - so long as the myVariable class/struct has an explicit(or implicit) operator that returns an int then it will be converted (by the class/struct that myVariable is an instance of - not by Int32)
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
dataminers wrote: Convert.Int32(myVariable)
That will do different things depending on the type of myVariable. If it's a string, it will be parsed. If it's numeric (byte, short, float, double, et.c) it will be converted.
dataminers wrote: Int32.Parse(myVariable)
Only accepts a string, and tries to parse it into an int.
dataminers wrote: (int)myVariable
That depends on the type of myVariable. If it's an object reference pointing to a boxed int it will be unboxed. If it's numeric it will be converted.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi there
I'm currently building a simple downloader application. I need to provide Pause/Resume facility to the application. How can I do that?
(I use WebClient control) and the method DownloadFileAsync()
|
|
|
|
|
See this[^] article for an FTP analog of what you want to do.
/ravi
|
|
|
|
|
I have a WinForm app that needs to send data to, and retrieve data from a Web Service. Right now, it's done in the clear, but we want the data sent back and forth to be encrypted. I've suggested using HTTPS/SSL, but I'm not sure what to google for. Any help would be appreciated.
"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 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
What about encrypting the SOAP Message...
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Do these links help?/ravi
|
|
|
|
|
The first link, maybe (but it looks like supreme hassle to implement). The second link, no.
"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 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: I've suggested using HTTPS/SSL, but I'm not sure what to google for
Setting up SSL under IIS is pretty simple. This should help.[^]
I have never tried an SSL ULR for a WebService but according to the Documentation[^] it should just work.
Note: The Framework caches SSL sessions as they are created and attempts to reuse a cached session for a new request, if possible. When attempting to reuse an SSL session, the Framework uses the first element of ClientCertificates (if there is one), or tries to reuse an anonymous sessions if ClientCertificates is empty.
led mike
|
|
|
|
|
Easy as pie, just run the service on https. Further encryption would be overkill or just too enterprisey.
|
|
|
|
|
I don't think it's going to be "easy as pie". It seems to me that since I'm using the service from a Windows form app, I would have to encrypt outgoing data, and decrypt incoming data. The thing is, I'm not sure what to use - WSE 3.0 or WCF.
"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 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: It seems to me that since I'm using the service from a Windows form app, I would have to encrypt outgoing data, and decrypt incoming data.
Thats all automatic if you use SSL. Just host any webservice on SSL, and connect!
John Simmons / outlaw programmer wrote: The thing is, I'm not sure what to use - WSE 3.0 or WCF.
That has nothing to do with encryption, WSE defines security.
|
|
|
|