Native .NET Core Support
In the release 2018.1, we present a full-featured report generator, created using the cross-platform technology — .NET Core. A full set of Web components such as the report designer as well as additional tools for quick export and report printing is available. The .NET Core components are included in the product Stimulsoft Reports.Web and Stimulsoft Reports.Ultimate.
اشتراکها
معماری سرویس گرا در دات نت
Today, the Entity Framework Core team announces the first preview release of EF Core 6.0. This release includes new attributes, built-in functions, and database-specific improvements to SQLite and SQL Server capabilities.
نظرات مطالب
طریقه بررسی صحت کدملی به کمک متدهای الحاقی
با تشکر از شما متد فوق بصورت زیر اصلاح شد و کلاس مربوطه بروزرسانی شده است:
البته من فرض کردم که کد ملی 0010350829 معتبر و کد 0010350822 نامعتبر است. آیا شما مطمئن هستید که کد 0010350829 معتبر است؟
/// <summary> /// Validate IR National Code /// </summary> /// <param name="nationalcode">National Code</param> /// <param name="lastNumber">Last Number Of National Code</param> /// <returns></returns> public static bool IsValidNationalCode(this string nationalcode, out int lastNumber) { lastNumber = -1; if (!nationalcode.IsItNumber()) return false; var invalid = new[] { "0000000000", "1111111111", "2222222222", "3333333333", "4444444444", "5555555555", "6666666666", "7777777777", "8888888888", "9999999999" }; if (invalid.Contains(nationalcode)) return false; var array = nationalcode.ToCharArray(); if (array.Length != 10) return false; var j = 10; var sum = 0; for (var i = 0; i < array.Length - 1; i++) { sum += Int32.Parse(array[i].ToString(CultureInfo.InvariantCulture)) * j; j--; } var diff = sum % 11; if (diff < 2) { lastNumber = diff; return diff == Int32.Parse(array[9].ToString(CultureInfo.InvariantCulture)); } var temp = Math.Abs(diff - 11); lastNumber = temp; return temp == Int32.Parse(array[9].ToString(CultureInfo.InvariantCulture)); }
اشتراکها