⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 class1.cs

📁 这个源友是实现文字竖排功能
💻 CS
字号:
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Imaging;
namespace WindowsFormsApplication1
{
    
	/// <summary>
	/// Class1 的摘要说明。
	/// </summary>
 	 class Class1
    {
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
            Class1.TryIt();
        }
		/// <summary>
		/// 应用程序的主入口点。
		/// </summary>
		[STAThread]
		public static void TryIt()
		{
			string[] a=stringtoken( "张三;13912345678;02883036666;Zhangsan@sina.com;"  ,  ';');
			for(int i=0;i<a.Length;i++)
			{
				System.Console.WriteLine(a[i]);
			}
			System.Console.Read();
		}

		static string[] stringtoken(string s,char sign)
		{   ArrayList al=new ArrayList();
			char[] temp=s.ToCharArray();
			int pos=0;
			for(int i=0;i<temp.Length;i++)
			{
				if(temp[i]==sign)
				{   
					char[] a=new char[i-pos];
					
					for(int j=pos;j<i;j++)
					{
						a[j-pos]=temp[j];
					}
					al.Add(new string(a));
					pos=i+1;
				}
			}
			string[] ret=new string[al.Count];
			for(int i=0;i<al.Count;i++)
			{
               ret[i]=al[i].ToString();
			}

			return ret;
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -