
C#
文章平均质量分 61
gd_linlong
又帅又能干,没别的优点
展开
-
自定义PowerPoint切换幻灯片按钮
首先建立powerpoint外接程序。点击新建->项目->office->我选择的是powerpoint2010外接程序。建好项目后,给项目添加引用Microsoft.Office.Interop.PowerPoint; 如果是office 2007 添加Microsoft.Office.Interop.PowerPoint为12版本的引用。如果是office2010则添原创 2016-06-23 17:25:24 · 1561 阅读 · 0 评论 -
打开Word文件并显示在RichtTextBox上
private void btn_word_Click(object sender, EventArgs e) { //调用对话框打开的word文件,RTFW文件, OpenFileDialog opd = new OpenFileDialog(); //文件路径的初始磁盘位置 opd.InitialDirector原创 2016-06-28 16:13:52 · 425 阅读 · 0 评论 -
foreach与for的区别
foreach语句用于循环访问集合以获取所需信息,但不应用于更改集合内容以避免产生不可预知的副作用。foreach语句是C#里新增的循环语句,他对处理数组和集合等数据类型特别方便。foreach语句的一般语句格式如下:原创 2016-06-29 16:07:00 · 320 阅读 · 0 评论 -
只使用代码创建WPF应用程序
新建一个window1的Class类using System.Windows;using System.Windows.Controls;using System.Windows.Markup;namespace wpf2{ //继承window class window1:Window { private Button button1; public windo原创 2016-07-26 13:26:18 · 368 阅读 · 0 评论 -
用代码和位编译的XAML文件,创建WPF程序
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows;using System.Windows.Controls;using System.Windows.Data;using System.Windows.Documents;us原创 2016-08-01 13:30:33 · 335 阅读 · 0 评论 -
c# 类的练习
狼和狮子的简单游戏。class Program { static void Main(string[] args) { Lion lion = new Lion(); Wolf[] wolves = new Wolf[9]; for (int i = 0; i < wolves.Le原创 2016-11-09 14:46:57 · 991 阅读 · 0 评论