- 博客(7)
- 资源 (3)
- 收藏
- 关注
原创 使用ToCharArray函数
输入一个由若干字符组成的字符串,输出其中的大写字母、小写字母、数字和其他字符的个数。using System;using System.Collections.Generic;using System.Collections;using System.Linq;using System.Text;namespace test{ class Program {
2014-11-21 19:12:49 2948
原创 控制台应用
.编写一个控制台应用。输入一组整数,输出所有的奇数。 提示:使用字符串的Split函数using System;using System.Collections.Generic;using System.Collections;using System.Linq;using System.Text;namespace test{ class Program
2014-11-21 19:11:41 647
原创 再次调用
编写一个名称为MyClass一个类,在该类中编写一个方法,名称为CountChar,返回值为整型,参数两个,第一个参数可以是字符串、整数、单精度、双精度,第二个参数为字符,方法功能返回第二个参数在第一个参数中出现次数。如CountChar("6221982",'2')返回值为3。继续在该类中编写一下方法,名称为Reconvert,参数一个,但可以是字符串、整数、单精度、双精度,方法功能返回
2014-11-21 19:10:46 836
原创 调用类完成操作
.编写一个名称为MyClass一个类,在该类中编写一个方法,名称为CountChar,返回值为整型,参数两个,第一个参数可以是字符串、整数、单精度、双精度,第二个参数为字符,方法功能返回第二个参数在第一个参数中出现次数。如CountChar("6221982",'2')返回值为3。using System;using System.Collections.Generic;using Sys
2014-11-21 19:08:37 1122
原创 编写一个控制台程序,创建哈希集合,
using System;using System.Collections.Generic;using System.Collections;using System.Linq;using System.Text;namespace test{ class Program { static void Main(string[] args)
2014-11-21 19:03:53 877
原创 定义一个静态成员方法,该方法实现字符串反转
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ class Program { static void Main(string[] args) {
2014-11-21 19:02:00 948
原创 定义一个静态成员方法,该方法用于提取文件名
定义一个静态成员方法,该方法用于提取文件名。比如,给定一个字符串“c:\programfiles\Maths\all.dat”,使用该方法即可获取文件名all.dat。
2014-11-21 19:00:56 664
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人