Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | "Vittorio" <scipionelafricano@tim.it> |
|---|---|
| Newsgroups | it.comp.java |
| Subject | c'è anche in java una simile sintassi? |
| Date | 2015-10-12 23:12 +0200 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <mvh7nl$16a$1@speranza.aioe.org> (permalink) |
E' codice C# .
Serve per impostare le due proprietà username\password ; Notare che
Credentials è una interfaccia implementata dalla classe NetworkCredential,
ma tale interfaccia non possiede le due proprietà username\password ( che
sono possedute invece dalla classe NetworkCredential) ,per cui per
impostarle si usa il costrutto con le due graffe.
SmtpClient sc = new SmtpClient("hostpc",678);
sc.Credentials = new System.Net.NetworkCredential()
{
UserName = "ffff",
Password = "fhy"
};
Ciao
Back to it.comp.java | Previous | Next — Next in thread | Find similar
c'è anche in java una simile sintassi? "Vittorio" <scipionelafricano@tim.it> - 2015-10-12 23:12 +0200
c'è anche in java una simile sintassi? "Alessandro Carraro (JUG Padova)" <carraro.alessandro@gmail.com> - 2015-10-12 22:05 -0700
Re: c'è anche in java una simile sintassi? "Dr.UgoGagliardelli" <do.not.spam@me.please> - 2015-10-14 11:49 +0200
Re: c'è anche in java una simile sintassi? "Vittorio" <scipionelafricano@tim.it> - 2015-10-14 12:17 +0200
Re: c'è anche in java una simile sintassi? "Dr.UgoGagliardelli" <do.not.spam@me.please> - 2015-10-14 13:19 +0200
csiph-web