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

📄 columnscollection.cs

📁 CRM的移动平台代码
💻 CS
字号:
using System;

namespace Microsoft.Crm.Sandbox.Mobile.Helpers.Collection
{
	/// <summary>
	/// Used by the ColumnSetHelper class to keep track of the columns
	/// </summary>
	/// <remarks>Unlike the other collection classes, this class is used internally</remarks>
	public class ColumnsCollection : System.Collections.CollectionBase
	{
		#region Properties

		internal string this[int index]
		{
			get
			{
				return (string)List[index];
			}
		}

		#endregion

		#region Methods

		internal void AddColumn(string attributeName)
		{
			// add only if the attribute does not already exist in the list
			if (!List.Contains(attributeName))
			{
				List.Add(attributeName);
			}
		}

		internal string[] ToStringArray()
		{
			// initialize an array to the number of columns in the columns collection
			string[] returnArray = new string[List.Count];

			// populate the array
			for (int index = 0; index < returnArray.Length; index++)
			{
				returnArray[index] = (string)List[index];
			}

			return returnArray;
		}

		#endregion
	}
}

⌨️ 快捷键说明

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