首页 > Windows开发 > 详细

C# 自定义类中括号取值 测试

时间:2019-09-04 13:52:59      阅读:147      评论:0      收藏:0      [点我收藏+]
    public class ABC : Hashtable{}
    static class Program
    {
        public static ABC  a= new ABC();
        static void Main(string[] args)
        {
            var c = a["0"]; //自定义类中括号取值
        }
    }

 

        var t = Request.Form["sets"].ToString();
  public abstract class HttpRequest
    {
        public abstract IFormCollection Form { get; set; }
    }

    public interface IFormCollection : IEnumerable<KeyValuePair<string, StringValues>>, IEnumerable
    {
  

        StringValues this[string key] { get; }

        int Count { get; }
     
        ICollection<string> Keys { get; }

        IFormFileCollection Files { get; }


        bool ContainsKey(string key);

      
        bool TryGetValue(string key, out StringValues value);
}

 

C# 自定义类中括号取值 测试

原文:https://www.cnblogs.com/enych/p/11458489.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!