visual C#でlinq文などで下記の例のobjnewupに入っているコレクションを取り出したいのですが、どういう書式にすればいいのか全くわかりません。
bool num = this.repeats.objnewUp.Exists(x => x > 1); ←とりだせない
objnewUpで絞りたいのですが絞り込めません
申し訳ございませんがご教授お願いいたします。
もし宜しければ、この関連のおすすめページとかもあれば教えてほしいです。
【form1】
private List<repeat> repeats = new List<repeat>();
int x = 1;
var extObj2 = new repeat
{
objnewUp = x,
};
this.repeats.Add(extObj2);
【repeat.cs】
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WindowsFormsApplication1
{
class repeat
{
public int objnewUp { get; set; }
public repeat() { } }
}
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。