Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/311.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 信用卡伪装_C#_Regex_Winforms_Devexpress - Fatal编程技术网

C# 信用卡伪装

C# 信用卡伪装,c#,regex,winforms,devexpress,C#,Regex,Winforms,Devexpress,如何使用下图屏蔽textedit 如何简化IIN范围,因为对于万事达卡类型,我需要逐个键入它 `[*5]{1}[*1-5]{1}[*0-9]{2}-[*0-9]{4}-[*0-9]{4}-[*0-9]{4,5}` 但是如果MaestrocardType呢?有没有一种格式没有像上面那样一个接一个地明确解释,而且你知道有很多 我是否需要为每种类型的信用卡制作大量的if,以便在文本编辑中进行屏蔽。因此,在combobox中,如果我选择一张特定的信用卡,它将使用该信用卡的屏蔽类型 他是这样做的:

如何使用下图屏蔽
textedit

如何简化
IIN范围
,因为对于万事达卡类型,我需要逐个键入它

`[*5]{1}[*1-5]{1}[*0-9]{2}-[*0-9]{4}-[*0-9]{4}-[*0-9]{4,5}`
  • 但是如果
    Maestro
    cardType呢?有没有一种格式没有像上面那样一个接一个地明确解释,而且你知道有很多
  • 我是否需要为每种类型的信用卡制作大量的
    if
    ,以便在
    文本编辑中进行屏蔽。因此,在combobox中,如果我选择一张特定的信用卡,它将使用该信用卡的
    屏蔽类型
  • 他是这样做的:
  • 此文件或在XML文件中
  • 字典卡=新字典();
    卡。添加(“VISA”,新卡(4,“[5-6]”);
    卡片。添加(“MAESTRO”,新卡片(5、[5-6]);
    卡片。添加(“FORB”,新卡片(4,[5-6]”);
    班级卡
    {
    公共卡(整数长度,字符串格式){
    //待办事项
    }
    公共整数长度;
    公共字符串格式;
    }
    
  • 他是这样做的:
  • 此文件或在XML文件中
  • 字典卡=新字典();
    卡。添加(“VISA”,新卡(4,“[5-6]”);
    卡片。添加(“MAESTRO”,新卡片(5、[5-6]);
    卡片。添加(“FORB”,新卡片(4,[5-6]”);
    班级卡
    {
    公共卡(整数长度,字符串格式){
    //待办事项
    }
    公共整数长度;
    公共字符串格式;
    }
    
    type: 'mastercard'
    pattern: /^(5[1-5]|2[2-7])/
    length: [16]
    
    type: 'visaelectron'
    pattern: /^4(026|17500|405|508|844|91[37])/
    length: [16]
    
    type: 'forbrugsforeningen'
    pattern: /^600/
    length: [16]
    
    Dictionary<string, Card> cards = new Dictionary<string, Card>();
    cards.Add("VISA",new Card(4, "[5-6]"));
    cards.Add("MAESTRO",new Card(5, "[5-6]"));
    cards.Add("FORB",new Card(4, "[5-6]"));
    
    class Card
    {
        public Card(int length, string format){
            //TODO
        }
        public int Length;
        public string format;
    }