چه جور میشه براساس دستور Split در فیلد برچسب یه عدد سرچ کرد و بعد ایدی اون ستون بیاد بیرون
مثلا سرچ کنه ایا عدد 1 داخل فیلد barjasb وجود داره یا نه اگه وجود داره ایدی اون بیاد بیرون
نیازی به Split نیست
میتونید با استفاده از Contains چک کنید این دستور معادل like در Sql هست
میشه کدش واسه این کار بهم بگی
میخوام از لیست ویو به جای گرید ویو استفاده کنم
شما تا جایی که میتونید پیش برید و بعد کد رو ضمیمه کنید تا من براتون کامل کنم
ببخشید من تا حالا با این دستور کار نکردم هیچی بلد نیستم
string[] fruits = { "apple", "banana", "mango", "orange", "passionfruit", "grape" }; string fruit = "mango"; bool hasMango = fruits.Contains(fruit); Console.WriteLine( "The array {0} contain '{1}'.", hasMango ? "does" : "does not", fruit); // This code produces the following output: // // The array does contain 'mango'.
using System; using System.Collections.Generic; using System.Linq; class Program { static void Main() { // Create List with three elements. var list = new List<string>(); list.Add("cat"); list.Add("dog"); list.Add("moth"); // Search for this element. if (list.Contains("dog")) { Console.WriteLine("dog was found"); } // Search for this element in any string case. // ... This is the LINQ method with the same name. if (list.Contains("MOTH", StringComparer.OrdinalIgnoreCase)) { Console.WriteLine("MOTH was found (insensitive)"); } // This element is not found. Console.WriteLine(list.Contains("fish")); } }
هیچ کاربری تا کنون از این پست تشکر نکرده است
با ما تماس بگیرید تا در این مسیر همراهتان باشیم :)