using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
namespace UdpClientServer
{
class class1
{
static void Main()
{
StarListener();
Console.ReadLine();
......................
阅读全部
|
weiwei2023
贴于 2023年4月12日 13:04
hide
bbsi
public void EnableDHCP()
{
string ethernetDescription = "{5F632379-D5A7-4F26-89FC-C172212EDF65}";
ManagementClass wmi = new ManagementClass("Win32_NetworkAdapterConfiguration");
ManagementObjectCollection moc = wmi.GetInstances();
foreach (ManagementObject mo in moc)
{
//如果没有启用IP设置的网络设备则跳过
/* if (!(bool)mo["IPEnabled"])
continue;*/
string settingID = mo["SettingID"].ToString();
......................
阅读全部
|
巴厘岛
贴于 2022年12月1日 16:40
hide
bbsi
using N1;
namespace Test02
{
class program
{
static void Main(string[] args)
{
A oa=new A();
oa.Myls();
}
}
......................
阅读全部
|
caiji1
贴于 2021年8月22日 08:28
hide
bbsi
using System;
using System.IO;code_br_code_br_namespace FileApplication
{
class Program
{
static void Main(string[] args)
{
try
{
// 创建一个 StreamReader 的实例来读取文件
// using 语句也能关闭 StreamReader
using (StreamReader sr = new StreamReader("names.txt"))
......................
阅读全部
|
Xyk87
贴于 2021年4月29日 21:05
hide
bbsi
using System;
using System.IO;code_br_code_br_namespace FileApplication
{
class Program
{
static void Main(string[] args)
{
try
{
// 创建一个 StreamReader 的实例来读取文件
// using 语句也能关闭 StreamReader
using (StreamReader sr = new StreamReader("names.txt"))
......................
阅读全部
|
Xyk87
贴于 2021年4月29日 21:04
hide
bbsi
Option Explicit
Private Const WS_CHILD = &H40000000
Private Const WS_VISIBLE = &H10000000
Private Const LVS_REPORT = &H1
Private Declare Function CreateWindowEx Lib "user32.dll" Alias "CreateWindowExA" (ByVal dwExStyle As Long, ByVal lpClassName As String, ByVal lpWindowName As String, ByVal dwStyle As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hWndParent As Long, ByVal hMenu As Long, ByVal hInstance As Long, ByRef lpParam As Any) As Long
Private Declare Function DestroyWindow Lib "user32" (ByVal hWnd As Long) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Type LVCOLUMN
Mask As Long
Fmt As Long
cX As Long
pszText As String
......................
阅读全部
|
LHY163311
贴于 2020年12月3日 18:54
hide
bbsi
Option Explicit
Private Const WS_CHILD = &H40000000
Private Const WS_VISIBLE = &H10000000
Private Const LVS_REPORT = &H1
Private Declare Function CreateWindowEx Lib "user32.dll" Alias "CreateWindowExA" (ByVal dwExStyle As Long, ByVal lpClassName As String, ByVal lpWindowName As String, ByVal dwStyle As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hWndParent As Long, ByVal hMenu As Long, ByVal hInstance As Long, ByRef lpParam As Any) As Long
Private Declare Function DestroyWindow Lib "user32" (ByVal hWnd As Long) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Type LVCOLUMN
Mask As Long
Fmt As Long
cX As Long
pszText As String
......................
阅读全部
|
LHY163311
贴于 2020年12月3日 18:54
hide
bbsi
//辅助自定义代码生成器用
public void READSB()
{
string dir = AppDomain.CurrentDomain.BaseDirectory;
dir = dir + "READ\\";
if (!Directory.Exists(dir))
{
Directory.CreateDirectory(dir);
}
string file = dir + "a.txt";
string file2 = dir + "b.txt";
......................
阅读全部
|
miaoge911015
贴于 2020年9月23日 18:30
hide
bbsi
using System;
namespace bccn
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("随机编码");
Console.WriteLine();
// 练习一下随机编码的使用
......................
阅读全部
|
miaoge911015
贴于 2020年9月23日 18:08
hide
bbsi
namespace oozinoz1
{
/**/
/// <summary>
/// Class5 的摘要说明。
/// </summary>
public class Class5
{
private static void InsertImage(string imagePath, string wordPath)
{
Document document = new Document();
Section s = document.AddSection();
......................
阅读全部
|
lty666
贴于 2020年5月22日 11:47
hide
bbsi