35000.50;
emp2.EmployeeID = 2;
emp2.LastName = "B";
emp2.FirstName = "J";
emp2.YearsService = 9;
emp2.Salary = 23700.30;
T
C# Programmation Réseau: Obtenir l’adresse IP de l’hôte
ons of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistributions in binary fo
C# Programmation Réseau: Créer un Socket d’écoute
yListener = new TcpListener(PortNumber);
MyListener.Start();
//Console.WriteLine("Waiting For Connection");
TcpClient MyClient = MyListener.
C# Programmation Réseau: Créer un Serveur de calcul
Console.WriteLine("Hit to exit...");
Console.ReadLine();
return 0;
}
}
public class MathClass : MarshalByRefObject
{
public
C# Programmation Réseau: Attacher un fichier à un email
1.net";
newmessage.Subject = "A test mail attachment message";
newmessage.Priority = MailPriority.High;
newmessage.Headers.Add("Comments",
C# Programmation Réseau: Afficher l’état de fonctionnement d’une interface réseau.
using System;
using System.Net.NetworkInformation;
class MainClass {
static void Main() {
if (NetworkInterface.GetIsNetworkAvailable()) {
NetworkInterface[] interfaces = NetworkInterface.GetAllNetworkInterfaces();
foreach (NetworkInterface ni in interfaces) {
Console.WriteLine(" Status: {0}", ni.OperationalStatus);
}
} else {
Console.WriteLine("No network available.");
}
}
}
C# Programmation Réseau: Lire les données d’un Socket UDP
Point)iep;
sock.Bind(iep);
sock.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.AddMembership,
new MulticastOption(IPAddress.Pars
C# Programmation Réseau: Lire les Cookies associés à une requête
Console.WriteLine("Cookie:");
Console.WriteLine("{0} = {1}", cook.Name, cook.Value);
Console.WriteLine("Domain: {
C# Programmation Réseau: Afficher la fréquence de l’interface réseaux
using System;
using System.Net.NetworkInformation;
class MainClass {
static void Main() {
if (NetworkInterface.GetIsNetworkAvailable()) {
NetworkInterface[] interfaces = NetworkInterface.GetAllNetworkInterfaces();
foreach (NetworkInterface ni in interfaces) {
Console.WriteLine(" Speed: {0}", ni.Speed);
}
} else {
Console.WriteLine("No network available.");
}
}
}
C# Programmation Réseau: Lire les données binaires
ient.GetStream();
IFormatter formatter = new BinaryFormatter();
SerialEmployee emp1 = (SerialEmployee)formatter.Deserialize(strm);
Console.Wr