Posts

Showing posts from 2019

The specified version string contains wildcards, which are not compatible with determinism.

Image
With some versions of Visual studio when you try to make version auto number sometimes it get an error like : Error CS8357 The specified version string contains wildcards, which are not compatible with determinism. Either remove wildcards from the version string, or disable determinism for this compilation Solution : Unload Project from visual studio and edit .csproj file Or open .csproj solution file in editor. Search for tag and Change value from true to false Save file and reload project again inside Visual studio <propertygroup> <configuration condition=" '$(Configuration)' == '' ">Debug</configuration> <platform condition=" '$(Platform)' == '' ">AnyCPU</platform> <projectguid>{76602FA1-9AD8-4014-BA5D-2E9128C19AB2}</projectguid> <targetframeworkversion>v4.7</targetframeworkversion> <filealignment>512</filealignment> <a

Get Credit Card Type

How to get C-card type, how to know the input card number is Visa or Master Card ? here the code for CreditCard.cs public class CreditCard { private string AmericanExpressPattern => @"^3[47][0-9]{13}$"; private string MasterCardPattern => @"^5[1-5][0-9]{14}$"; private string VisaCardPattern => @"^4[0-9]{12}(?:[0-9]{3})?$"; private string DinersClubCardPattern => @"^3(?:0[0-5]|[68][0-9])[0-9]{11}$"; private string EnRouteCardPattern => @"^(2014|2149)"; private string DiscoverCardPattern => @"^6(?:011|5[0-9]{2})[0-9]{12}$"; private string JcbCardPattern => @"^(?:2131|1800|35\d{3})\d{11}$"; private Dictionary CreditRegxs { get; set; } public CreditCard() { CreditRegxs = new Dictionary () { {"American Express",AmericanExpressPattern}, {"Mastercard",MasterCardPattern}, {"Visa&q