-
控制台程序添加引用
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections.Generic;
using System.Text;
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
namespace MultipleControl
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
class Program
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
static void Main(string[] args)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
/// 新建的控制台程序最初找不到System.Web.UI的UI是因为:
/// 在References文件夹内默认没有System.Web项,在项目上右键Add Reference
/// .NET 选项卡中选择System.Web即可
/// </summary>
public class CompositeControl : Control
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
/// 因为是控制台程序,不可能有Label型控件的,也没有this指针
/// </summary>
Label label1 = new Label();
//label1
}
}
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
-
相关阅读:
Socket
Cookie & Session
一些快捷键&工具的用法收集
过桥问题及一些想法
微信初步开发(测试用)
代码的编写习惯
Python爬虫简单笔记
如何降低AzurePaasSQL的表占用空间
Sonar代码检测工具安装与使用及问题记录
AzureDevops发布Artifact
-
原文地址:https://www.cnblogs.com/simhare/p/825896.html
Copyright © 2020-2023
润新知