C#里List的用法
来源:互联网 发布:淘宝什么时候收货到期 编辑:程序博客网 时间:2024/06/07 00:37
C#里List的用法
主程序代码:
static void Main(string[] args)
{
ClassList listClass = new ClassList();
Console.WriteLine("请输入第个字符串");
string a = Console.ReadLine();
Console.WriteLine("请输入第二个字符串");
string b = Console.ReadLine();
主程序代码:
static void Main(string[] args)
{
ClassList listClass = new ClassList();
Console.WriteLine("请输入第个字符串");
string a = Console.ReadLine();
Console.WriteLine("请输入第二个字符串");
string b = Console.ReadLine();
foreach (string n in listClass.strList(a, b))
{
Console.WriteLine(n);
}
类:
class ClassList
{
public List<string> strList(string str1,string str2)
{
string stra = str1 + str2;
string strb = str2 + str1;
string strc = str1 + str1;
List<string> listStr = new List<string>();
listStr.Add(stra);
listStr.Add(strb);
listStr.Add(strc);
return listStr;
}
}
- C#里List的用法
- C#里List类用法
- C#里List类用法
- libevent里list的用法
- c# list的用法
- c#里FindWindow的用法
- stl里list的sort()用法
- C#泛型List的用法
- C#泛型List的用法
- C#泛型List的用法
- C#中List的排序用法(Sort)
- c# 泛型List的定义、作用、用法
- C#中List的排序用法(Sort)
- C#中List的排序用法(Sort)
- C# List<T> Contains<T>() 的用法
- 关于C#中list的用法
- C#中List的排序用法(Sort)
- C# 泛型List的定义、作用、用法
- VC6如何使用VS2005中的CImage类功能
- 开源QQ协议库QQProtocol
- MFC学习记录 5.单文档应用-焰火
- 用js得到select被选中的值
- C#泛型演示
- C#里List的用法
- JAVA程序员面试32问,你能回答多少题?
- WPF 线程:使用调度程序构建反应速度更快的应用程序
- P2P技术介绍
- google搜索原理论文
- 写在最前面
- gethostbyaddr由IP地址取得网络数据
- C语言文件操作函数
- 编写线程安全的JSP程序