博文

目前显示的是 十月, 2019的博文

Enumerable.Distinct Method in C#

Reference: https://docs.microsoft.com/en-us/dotnet/api/system.linq.enumerable.distinct?f1url=https%3A%2F%2Fmsdn.microsoft.com%2Fquery%2Fdev15.query%3FappId%3DDev15IDEF1%26l%3DEN-US%26k%3Dk(System.Linq.Enumerable.Distinct%60%601);k(SolutionItemsProject);k(TargetFrameworkMoniker-.NETFramework,Version%3Dv4.6.1);k(DevLang-csharp)%26rd%3Dtrue&view=netframework-4.8 public class Product { public string Name { get ; set ; } public int Code { get ; set ; } } // Custom comparer for the Product class class ProductComparer : IEqualityComparer < Product > { // Products are equal if their names and product numbers are equal. public bool Equals ( Product x, Product y ) { //Check whether the compared objects reference the same data. if (Object.ReferenceEquals(x, y)) return true ; //Check whether any of the compared objects is null. if (Object.ReferenceEquals(x, null ) || Object.ReferenceEquals(y, null ))

Form in element.eleme.io

Form Form consists of input , radio , select , checkbox and so on. With form, you can collect, verify and submit data. ¶ Basic form It includes all kinds of input items, such as input , select , radio and checkbox . Activity name Activity zone Activity time - Instant delivery Activity type Resources Activity form In each form component, you need a form-item field to be the container of your input item. < el-form ref = "form" :model = "form" label-width = "120px" > < el-form-item label = "Activity name" > < el-input v-model = "form.name" > </ el-input > </ el-form-item > < el-form-item label = "Activity zone" > < el-select v-model = "form.region" placeholder = "please select your zone" > < el-option label = "Zone one&quo