WPF Snake Game problem
I'm making a snake game which is based on 2 dimensional array and enum type for every element. It can be either GridValue.Empty, GridValue.Snake or GridValue.Food.
I'm kinda stuck because by now the snake should be shown when i turn it on but somehow every cell of the grid is empty.
If anyone could help me that would be nice cause im stuck on this for like 2 hours. It's nothing complicated and less than 10 mins of debugging but would mean a world to me.!...
✅ PLS IDK HOW TO FIX THIS
Every now and then during compilation due to changes made in the project, the loading loops at this point and I don't know what to do.
![No description](https://cdn.answeroverflow.com/1330881271592915004/image.png)
✅ I cant see the map
I Try use https://leafletjs.com to imput a map on my project but, when i start project, the map didnt appears
![No description](https://cdn.answeroverflow.com/1330856565376290931/imagem_2025-01-20_110832344.png)
✅ executing
got a question im kind of new but i have a projecet in C# i want to make into like a file that i can just have on my pc share with people and execute how would i do this please help and thankk u to all that do relaly appreciate it
✅ Mocking DB operations
Say I have a function and I need to verify that the saved UserFollow object will:
1. Cause the user objects to be retrieved if UserFollow retrieves them eagerly
2. Cause the userFollow to be retrieved if a User is retrieved with said fields eagerly
...
✅ how do i read a global variable
as you can see, my code currently relies on a variable which is passed byref, but i would really rather it be a global variable. i get an error when i try to do that though
![No description](https://cdn.answeroverflow.com/1330719948070326282/image.png)
✅ Please help teach me C sharp
I am currently in college and have started to learn c# programming and I am finding it difficult to remember all different functions and stuff, I am using visual studio I would greatly appreciate some help in any way possible.
✅ Listbox issue
hey, having issues with a listbox template:
```xml
<ListBox x:Name="PersonList" SelectionMode="Multiple">
<ListBox.ItemTemplate>
<DataTemplate>...
✅ Where a can learnSqlCommand Class
Its literally this, i need to study SQL with C# and don't now where study this topic. I find a website, but its don't explain right.
I have prefere with video but is don't the most important
(My english dont is the best!)...
Guys where do you recommend sources for learning?
I finished my first python semester and next semester is gonna be C#. I lwky wanted a headstart and started with leetcode but i don't know nothing about the syntax. The logic is there, all thats left is the code
✅ Pages
im working on a design that uses a frame to show different pages, im having trouble figuring out how to make a page that can switch to a different page without using buttons on the main form.
any help would be apricated...
✅ Othello game
```cs
boardState[3, 3] = Disk.White;
boardState[3, 4] = Disk.Black;
boardState[4, 3] = Disk.Black;
boardState[4, 4] = Disk.White;...
![No description](https://cdn.answeroverflow.com/1330575415437430905/image.png)
✅ UNIQUE constraint failed
I have the following relationships
One workout can have multiple exercises and each exercise can have one exercise variant I would like to implement this but I am getting an exception when saving a newly created workout
An error occurred while saving the entity changes.See the inner exception for details. // ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 19: 'UNIQUE constraint failed: ExerciseVariant.Id'. ...
WPF DataGrid on CustomControl
Hi, I need some help in WPF/XAML
I have a UserControl for a PaginatesTable where I have a couple of WPF controls inside, TextBox, DataGrid, and some buttons for pagination, the main idea of the UserControl is to be reusable, so basically I have some PaginatedTableViewModel<T> which I initialize on each ViewModel of the Views and then I pass an ObservableCollection into PaginatedTableViewModel<T> to render those Objects
But I need an approach to customize the DataGrid columns, Because obviously there are different properties on <T>...
Updating/Deleting owned properties with EF Core and AutoMapper
The problem I'm facing is that automapper is not tracking the changes since when i retrive AsNotracking() it wont change anything, but if i remove that, then it complains about the same entity being tracked when i do
mapper.map<Entity>(doman), which creates a new entity and EF begins tracking it, I solved it by fetching the entity in the repository and doing mapper.map(entity, domain) so it replaces the one i fetched, but in my command handler I already did the fetch of the entity and did an in place mapping to change its values, how can I avoid re fetching in my repository?...
Would a Declarative Reactive UI be too expensive?
Not 100% sure "reactive" is the right term. But frameworks like Flutter, where they rebuild sections of the UI with light weight objects when there is a state change. Would something like that work well in C#? Thinking of for like UI heavy games?
It feels like it would generate a lot of garbage so not really make sense to do. But I also see there is like MAUI Reactor. Which seems to do it. But seems like it wouldn't scale well. And doesn't seem like they are doing any pooling or anything.
It is one of those things that are a bit hard to setup a realistic MVP to profile myself....
when to use var keyword and when to use data type itself
Hello guys, can someone explain when should I use the
var
keyword and when should I use the actual data type pls.✅ How to move an NPC locally only
Im just trying to make an npc move to a location only for the client player only. My code below doesnt work
```lua
print("running")
local NPC = PlayerNPCFolder:WaitForChild("Noob")
local humanoid = NPC:WaitForChild("Humanoid")...
✅ Taking user input using Console.ReadLine()
Hello guys, can someone explain why my IDE (rider) has underlined the Console.ReadLine method pls.
```C#
Console.WriteLine("What is your name?");
string name = Console.ReadLine();...
![No description](https://cdn.answeroverflow.com/1330250173791862845/D37D75FB-92DA-4E01-8BA6-C0BA5D79FEA9.png)