As a C# developer—even with a great, active C# community—you may sometimes find yourself a little bit jealous. What
if we could bring the JavaScript language and ecosystem also into the
C# world? What if a C# developer could use JavaScript inside C#? Fret not! I’m thrilled to announce a new WinRT project I’ve created—ChakraBridge— which will allow you to get invited to the party like any web developers.
بازخوردهای پروژهها
متود IsIn
متاسفانه من ابزار لازم را برای pull request ندارم برای همین به جاش اینجا مواردی را که دوست دارم ارائه میدهم:
/// <summary> /// (Syntactic Sugar) Checks if the given value is among a list of values or not. /// </summary> /// <remarks> /// This method is for syntactic sugar. What it actually does is to allow developers to wrtie a code like this /// <code> /// xVariable.IsIn(MyEnum.Value1,MyEnum.Value2) /// </code> /// Instead of these codes: /// <code> /// new []{ MyEnum.Value1, MyEnum.Value2 }.Contains(xVariable); /// </code> /// Or more commonly: /// <code> /// xVariable == MyEnum.Value1 || xVariable == MyEnum.Value2 /// </code> /// </remarks> /// <typeparam name="T"></typeparam> /// <param name="source"></param> /// <param name="list"></param> /// <returns></returns> public static bool IsIn<T>(this T source, params T[] list) { Func<T, T, bool> compare = (v1, v2) => EqualityComparer<T>.Default.Equals(v1, v2); return list.Any(item => compare(item, source)); }
This post shows how to import and export .xls or .xlsx (Excel files) in ASP.NET Core. And when thinking about dealing with excel with .NET, we always look for third-party libraries or component. And one of the most popular .net library that reads and writes Excel 2007/2010 files using the Open Office Xml format (xlsx) is EPPlus. However, at the time of writing this post, this library is not updated to support .NET Core. But there exists an unofficial version of this library EPPlus.Core which can do the job of import and export xlsx in ASP.NET Core. This works on Windows, Linux and Mac.
اشتراکها
NET 9 Preview 7. منتشر شد
اشتراکها