mwc
Search object Inner list for value
My googlefu is failing for this one.
I have a list of an outer class (Board) that contains a (inner) list of another class (Properties).
Properties is essentially a dictionary (the object gets saved to XML, and you can't serialise a dictionary) with two properties, Property and Value, which are used to store various properties of the parent/outer class.
What I'm need to do, is search the inner list for a defined property (Connector), with a specific value (JP1).
I have suitable Linq that returns all the Board's, which have a Property set with the Property of Connector, but I'm struggling with how to check if that Property is set to JP1-
boards = Boards.Where(x => x.Properties.All(p => p.Property == "Connector")).ToList();
Can anybody point me in the correct direction?
13 replies
Where to change working directory in VS2022?
How do you change the working directory for a project in Visual Studio?
The project I'm working on relies on some external resources and has to be run in the external resource directory so I have it set to build there.
I've updated the resource, but as part of the update the directory name changes. The only references I can find to the old directory, were in the Project Properties under the Build menu, which I've updated to the new directory, but when trying to Start the build, I get an error message saying the working directory (stating the old directory) can't be found.
Anybody got any ideas?
3 replies
✅ Visual Studio and Github
I've joined here as I've got a Visual Studio/Github issue that is probably me being an idiot. I've finally created a github account to store a couple of my projects, but I'm struggling with how to actually upload the changes to Github.
The current project I'm working on, I have managed to upload to Github as the master branch. I've created a new branch, but I cannot get any changes to that new branch to upload to Github. I've tried creating the branch on Github and in VS, and the new branch is created in both places regardless of where it's created, but I can't get code changes to upload to github.
I'm sure I'm being an idiot and missing something really obvious, but could somebody explain to me how to do this, as my googlefu has failed, and I can't even find any kind of tutorial beyond the basics from MS?
35 replies