❶ 想用.net做一個EXE的小程序

System.Diagnostics.Process.Start()

❷ VB.net做一個小程序 求教

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim oleDbConnection1 As OleDb.OleDbConnection
Dim oledbDataAdapter As OleDb.OleDbDataAdapter
Dim oledbData As DataSet = New DataSet
Dim strConnect As String = "Provider= OraOLEDB.Oracle;Data Source=888;User ID=888;Password=888;"
oleDbConnection1 = New System.Data.OleDb.OleDbConnection(strConnect)
Dim strSql As String
strSql = "select *" & " from xx"
Dim oledbCommand As OleDb.OleDbCommand
oledbCommand.CommandText = strSql
oledbCommand.CommandType = CommandType.Text
oledbCommand.Connection = oleDbConnection1
oledbDataAdapter.SelectCommand = oledbCommand
oleDbConnection1.Open()
oledbDataAdapter.Fill(oledbData, "gy_bingrenxx")
oleDbConnection1.Close()

'在窗體上添加一個控制項,在這個位置加一句代碼
DataGridView1.DataSource = oledbDataAdapter.Tables("gy_bingrenxx")

End Sub

❸ ASP.NET或者ASP 做小程序

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Data.Sql;namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
} public void BtnSql_Click(object sender, EventArgs e)
{
string name1 = this.txtname.Text;
string name2=this.txtname2.Text;
// string sqlselect = "select name from sysobjects where xtype='U' ";
string Sqlcon = "server=.;database=News;uid=sa;pwd=sa";
string sqls = "select * from news";
SqlConnection con = new SqlConnection(Sqlcon); SqlDataAdapter adp = new SqlDataAdapter(sqls, con);
con.Open();

DataSet ds = new DataSet();
adp.Fill(ds.Tables[0]);
try
{ for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
SqlCommend cmd = new SqlComment("update "+ds.Tables[0].Rows[i]["name"].ToString()+" set name = replace(name,'日本','中國')")
cmd.ExecuteNonQuery(); }
this.label4.Text = "替換成功!";
}
catch (Exception ex)
{
Console.Write(ex.Message);
}
finally
{
con.Close();
}
}

❹ C#寫個小程序

using System.Diagnostic;
private void Command1_Click()
{
string myrun = "net send " + this.List1.Text + " '" + Strings.Trim(this.Text1.Text) + "'";
Process process = new Process();
process.StartInfo.FileName = "cmd.exe";
process.StartInfo.UseShellExecute = false;
process.StartInfo.CreateNoWindow = true;
process.StandardInput.WriteLine(myrun );
}

private void Form_Load()
{
string aa = "192.168.16.";
this.List1.AddItem("192.168.16.225");
for (i = 1; i <= 66; i++) {
string bb = aa + Strings.Trim(Conversion.Str(i));
this.List1.AddItem(bb);
}
}

❺ aspnet開發一個小程序謝謝

privatevoidBtn_Click(objectsender,EventArgse)
{
Processprocess=newProcess();
ProcessStartInfoinfo=newProcessStartInfo("cmd.exe");
info.CreateNoWindow=true;
info.RedirectStandardInput=true;
info.RedirectStandardOutput=true;
info.UseShellExecute=false;
process.StartInfo=info;
process.Start();
process.StandardInput.WriteLine("ipconfig-all&exit");
process.StandardInput.AutoFlush=true;
stringa=process.StandardOutput.ReadToEnd();
process.WaitForExit();
process.Close();
MessageBox.Show(a);
}
啥都有,自己動手截取吧

❻ C#小程序

using System;
public class A
{
public A()
{
Console.WriteLine("A");
}
}
public class B
{
public B()
{
Console.WriteLine("B");
}
}
public class C : A
{
B newb = new B();
}
class MainClass
{
public static void Main()
{
C newc = new C();
Console.ReadLine();
}
}

輸出結果:B A