|
Hi to all,
I am using .Net framework 1.1 and want to download files from FTP using C#. Anybody please help me to how to do this.
Pravin
|
|
|
|
|
Use WebClient class and DownlodData method in that. Before you need to authenticate the server. There are tons of samples available online.
|
|
|
|
|
is there any way in Listview to set a column property like frozen property in Datagridview ?
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
No, there isn't.
You'd have to write your own implementation of the ListView control to expose the properties required and provide all the drawing code to do this.
Or, you might want to try and find a 3rd party library that gives you such functionality. I don't know of any that do this.
|
|
|
|
|
hi there,
i want to know that why | and & exists if they seems to be useless infront of || and &&
please tell the use of | and &
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
| and & perform a bitwise operation, while || and && perform logical operations.
Also, the evaluation of || and && expressions is aborted once the result is certain, while | and & takes every operand into consideration.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
| and & are bit-wise operation while || and && are logic operation.
Was it you or somebody else who insisted on using all | and & instead of || and && for logic operations??
|
|
|
|
|
yeah, i remebered, this thing is still confusing
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Well, just use them as what they are meant for.
| and & for bitwise operation, much like + and /.
|| and && for logic operation, to make condition decision, or to get a true/false value, generally.
Most of the time, the result is the same, but the process where the result is resolved is different. Logic operation will be short-circuited by compiler, and I believe it is faster to be execute by CPU (correct me if I am wrong), because they are basically compare and jump operations.
If you use the bitwise operators instead of the logic operators, each and every one of the bitwise operators are to be evaluated, and under some situation, you may not get the same outcome:
obj= null;
a) if(obj != null && obj.ToString().Length > 0)
b) if(obj != null & obj.ToString().Length > 0)
Case b) will throw an exception because all of the statements in the if have to be evaluated.
|
|
|
|
|
| and & are bitwise operands. They can also be used as conditional operands (is that the right word?). The difference is easiest to explain with an example.
int x = 3; int y = 7;
if(x == 3 || y == 9)
Console.Writeline("Good to go.");
if(x == 3 | y == 9)
Console.Writeline("Good to go.");
In both cases "Good to go." is printed to the console. In the first case when x == 3 is evaluated to true, the body of the if statement is executed. In the second case x == 3 is evaluated to true and then y == 9 is also evaluated to true.
& works the same way:
int x = 3; int y = 7;
if(x == 4 && y == 9)
Console.Writeline("Good to go.");
if(x == 4 & y == 9)
Console.Writeline("Good to go.");
Once again in the first case, y == 9 is not evaluated. In the second case y == 9 is evaluated. In neither case is "Good to go." printed.
Does this make sense?
|
|
|
|
|
buddies, i know how they works, you misunderstood my question, i asked that why we uses | instead of ||, because || is better than | and output always same
e.g.
if (bool1 == true | bool2 == true)
// execute code
if (bool1 == true || bool2 == true)
// execute code
in above code both result will be same, but in first it will check both conditions however in second it will check first condition, if it false then check another else not
so why we uses | to decrease our performance?
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Xmen wrote: so why we uses | to decrease our performance?
| and & are not intended for use as logical operators although they can be (ab)used as such. They're intended for bitwise operations.
x = 6 | 3; <br />
<br />
x = 6 & 3; <br />
Otherwise [Microsoft is] toast in the long term no matter how much money they've got. They would be already if the Linux community didn't have it's head so firmly up it's own command line buffer that it looks like taking 15 years to find the desktop.
-- Matthew Faithfull
|
|
|
|
|
You only use | and & when you want both conditionals to be evaluated. Here is a somewhat crass example:
if(amanda.AttemptKiss() & sarah.AttempKiss())
Console.WriteLine("I'm back at university");
Even if you fail to kiss Amanda, you still want to try to kiss Sarah.
|
|
|
|
|
hehe, example of kisses
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
You should also check
if ( amanda.AttemptKiss ( sarah ) )
I would also consider having individual variables for containing individual references as too limiting and would instead use a Queue<Girls> .
|
|
|
|
|
To be pedantic.
<br />
Queue<girl> girls = new Queue<girl>();<br />
PopulateFromBar(girls);<br />
foreach(Girl g in girls){<br />
try {<br />
Drink d = bar.GetDrink();<br />
this.AttemptFlirt(g);<br />
g.Imbibe(d);<br />
this.AttemptKiss(g);<br />
this.CopAFeel(g);<br />
this.InviteHome(g);<br />
this.AddCompanion(g);<br />
this.Successes++;<br />
break;<br />
} catch(SlapException e) {<br />
this.AvoidList.Add(e.Girl);<br />
this.Drink(bar.GetDrink());<br />
} catch (RejectionException e) {<br />
this.Drink(bar.GetDrink());<br />
}<br />
}<br />
<br />
this.Travel(this.Home);<br />
</girl></girl>
For me, Successes is without a doubt a signed short. Can you get smaller than a short? I suppose we want a ridiculously large number that will never be reached in the future (*cough*640k*cough*), so that will do
|
|
|
|
|
John Oxley wrote: Can you get smaller than a short?
SByte
But don't let them know you have only a short.
if ( g.HasFriend )
{
this.WingMan.Add ( g.Friend ) ;
}
And try not to use break in a foreach , in fact why foreach a queue ?
|
|
|
|
|
hi all...
i am wroking with a c#.net application and i need to send fax ( pdf file )thru application.
for that i used faxcomlib.dll and its working fine, if i send .txt or .doc or .tiff.
But if i try to send a pdf file as fax it is giving error as shown below:
The data is invalid. (Exception from HRESULT: 0x8007000D)
I am using w2k3 server and vs2005 and i am also having a PDF reader . The document that should be sent is outside folder of application. is it required to give any permissions and all?
plz its really urgent .
Thnaks in advance
KIRAN
|
|
|
|
|
I am quite new to C# and I think this is a really easy fix...I just can't find it. I am creating a GUI calculator for my class and am slowly learning the language MS Visual Studio 2008. [I started on Java]
My main question is:
I created some buttons, a menu, and text fields in the design part of the program, but when I try to run the program to test it, all these widgets are disabled. I checked the properties value and “Enabled = true”. Is it because I have not bound a handler to them yet?
I am also not sure if I need to put something else in the method handler. Here is my = method. Do I need to use the sender/e parameters elsewhere or is that done by the language/IDE?
private void buttonEnter_Click(object sender, EventArgs e)<br />
{<br />
di = Double.Parse(inputImaginary.Text);<br />
c = Double.Parse(inputReal.Text);<br />
<br />
a = printReal; bi = printImaginary;<br />
<br />
switch (operatorSymbol)<br />
{<br />
case '+': addition(c, di); break;<br />
case '-': subtraction(c, di); break;<br />
case '*': multiplication(c, di); break;<br />
case '/': division(c, di); break;<br />
case '=': printReal = c; printImaginary = di; break;<br />
default: break;<br />
}<br />
<br />
outputImaginary.Text = printImaginary.ToString();<br />
outputReal.Text = printReal.ToString();<br />
}
Thank you very much for your time and help. I think next time I am just going to hand code the GUI.
|
|
|
|
|
First, Visual Studio is an IDE, not a language.
Did you double click on the button in design mode to create the event handler, or did you just type in the code? Search your solution to see if you've set the event handler - it should look like this:
this.buttonEnter.Click += new System.EventHandler(this.buttonEnter_Click);
You can set breakpoints to see if the handler is being executed.
Cheers,
Vikram.
"real dictators don't loose[sic] elections." - Diego Moita.
|
|
|
|
|
I checked and the aforementioned code is included and I did double click all the event items to create the handlers.
I also put a breakpoint at this spot and stepped through the program. It is being called. When the programs appears though everything is grayed out.
---------------------
EDIT
I went ahead and re-created the project. It works normally now. I have no idea why the other one is acting the way it is.
Thanks again.
modified on Thursday, February 21, 2008 1:11 PM
|
|
|
|
|
I've just found a quite nifty way to make typed generic factory methods using lambdas.
The concept makes it possible to get intellisense for the args passed to the factory.
Normally this is not possible because generic factory methods normally just take "params object[] args".
So for those geeky enough to care:
http://rogeralsing.com/2008/02/21/typed-factories-in-c3-managed-new/[^]
|
|
|
|
|
I'm simply tying to Access Fido.Age, Fido is a object created in Form1 from the class Dog.
Please look trough the project savefile, it's in C# 08.
http://www.stigern.net/WindowsFormsApplication1.zip
I would be VERY happy if someone helped me! Really stuck at this one
|
|
|
|
|
Sigh. Seeings that you probably aren't going to do the proper thing and actually implement something like the MVC pattern, you might want to look at this[^] article.
|
|
|
|
|
Hi,
I'm trying to implement some functionality found in a SIGGRAPH paper by Karl Sims called Artificial Evolution for Computer Graphics. In this paper he uses LISP functions to create what is known as Genetic Art.
I am keeping the same general structure as his techniques (using LISP-like nested list expressions), but I have chosen to run it with C#.
In his paper he references several functions: bitwise and, or, xor -- which operate on floating point numbers. However, the C# compiler will not let me do bitwise expressions with floating points. Is there any way I can get around this?
Thanks.
|
|
|
|