Bailey
Bailey
CC#
Created by Yasu on 10/20/2024 in #help
Can anyone help me switch my primary key column from int to uniqueidentifier for my web app?
Hello, before anyone can give a good answer, there is a lot of info needed. Just some pointers: - Is it a database which already is filled with records? - If there are any records, can they be removed - Is it an empty project ==> if Yes, you can delete the project and recreate with the correct id's. The sollution is dependant on the situation. If it's a relational database which is filled with data, there is (not necessarily) another sollution then if it's a new project. Just an example (of a possible sollution) if you got an existing relational database: 1) create the guid collumns (nillable) 2) fill the records with the related guids 3) add the foreign key 4) do checks by queries 5) remove the old foreign key and tables.
7 replies
CC#
Created by shiningvictory on 10/17/2024 in #help
Need help finding a library for a specific job
Hello, Normally I wouldn't send any to a searchengine or something. But this question is perfect for copilot. or any other search engine
3 replies
CC#
Created by navin007 on 10/5/2024 in #help
nugget package update
Hi, I think there are 2 issues namely: - somehow the program you got creates an error. and this can be a result of a nuget package. - It tries to start the debugger, but has no permissions. To solve it, you could give the debugger permissions and try to find the cause or check the nuget packages and check the dependancies (and downgrade when necesary).
13 replies
CC#
Created by MoBomba on 10/4/2024 in #help
✅ None of my stuff is being pushed to my repository on github.
Hi, If you do not show us the commands you use and the errors, we cant help.
10 replies
CC#
Created by Merineth 🇸🇪 on 10/2/2024 in #help
✅ Different output on same code.
so it would work without: var exception = new UDDivideByZeroException(number1, number2);
109 replies
CC#
Created by Merineth 🇸🇪 on 10/2/2024 in #help
✅ Different output on same code.
catch (Exception ex) // this catches the exception and adds the exception is in the var ex. { var exception = new UDDivideByZeroException(number1, number2); // this just creates a local variable with a self defined exception return 0; // returns a 0 } }
109 replies
CC#
Created by rocco on 10/2/2024 in #help
✅ vs code community don't start my code
if main does not exist, then it wont start. If the main starts, you can track where it exits
65 replies
CC#
Created by rocco on 10/2/2024 in #help
✅ vs code community don't start my code
Maybe this can help: If it worked in the past. put some breakpoints in the method: public static void Main()
65 replies
CC#
Created by TimVibes on 9/28/2024 in #help
Null Literal and NUll reference problems
Hi, I'm looking at the code and there can be a number of causes. Hope you can use the following: I would replace the array with a list like: List<Employees> listEmployees = new List<Employees>(); and add items using: listEmployees.Add(new Employees(line, Convert.ToInt32(line[1]), Convert.ToDecimal(line[2]), Convert.ToDouble(line[3]))); the second part is about ul reference. What you do in the code: employees[LineCount] = new Employees(line, Convert.ToInt32(line[1]), Convert.ToDecimal(line[2]), Convert.ToDouble(line[3])); - convert the second char into integer - convert the third character into decimal - convert the fourth char into double. When the line does not have the chars, the array (a string is under the hood an array of chars) it will give a null reference error. There are more possible tests you can add but first start something like below within the loop. if (string.IsNullOrEmpty(line) || line.Length <5 ) { // give some error or message and put breakpoint to look at data }
18 replies
CC#
Created by LifeOfVio on 9/24/2024 in #help
✅ OpenApi generation
Hi, There are multiple options - you could make the property nullable usin a ? - you could configure the database (read EF to see how). and tell it is nullable
39 replies
CC#
Created by olleeee on 9/23/2024 in #help
Binding problems, property not updating
Hi, The following can help solving the issue. Put some breakpoints in the swap and check the values. of which swaps are done and if the right objects are selected.
7 replies
CC#
Created by yusuff on 9/1/2024 in #help
udemy course advice related to C# , .net
Hi, I've done this course and it is a good beginners course but it is a course based on backend with some frontend. If you want more you should also follow a independant frontend course. Bootstrap is used with angular. another thing, just my advice. think of a project which fits in the course and try to make that instead of typing over, this helps understanding, but also helps to see what and where you need more.
26 replies
CC#
Created by Suraj Kumar on 8/23/2024 in #help
✅ Guidance in software development
Hi, You're question is not as simple as saying learn c#. Knowing the syntax of a language is part of being a developer. The other part is knowing how to structure a application / buildin it safely. you could seach for courses on youtube "IAmTimCorey". these are quite nice
26 replies
CC#
Created by kianyuen on 8/14/2024 in #help
Controls from WPF.UI can't render properly on WPF, .NET Framework 4.8
Hi, an issue like this is very difficult to analyse when you dont have the complete code. That said, maybe you can use the following: 99% o the time when having issues like this (and it does not matter which language / framework etc) it the cause of: - Not able to map the font - Resources missing (not added to the sollution). - Typo with the resource. So it could be as simple as that the resource must be included (or set on copy always in the sollution). Hope this helps
20 replies
CC#
Created by Bailey on 8/5/2024 in #help
reflection good course
anyway thanks for the support
20 replies
CC#
Created by Bailey on 8/5/2024 in #help
reflection good course
Keep in mind that this is reflection. So themethod e.g.
public void Sort(object toSort) { // Here I can use Get properties as an array and get the list property. // After this I want to convert the property to a list or any Collection listproperty = (Ilist) theListProperty ==> this works listProperty = (List<>) theListProperty ==> this gives a runtime error. } Having this said. I already found away around this. So I'm searching for good documentation / course on reflection. But it seems not to be available.
20 replies
CC#
Created by Bailey on 8/5/2024 in #help
reflection good course
Hi, Sorry for the late reaction. If you have an object defined in a list. e.g. List<Student>()
20 replies
CC#
Created by Bailey on 7/16/2024 in #help
Reflection and customclass in list properties c#
--close
18 replies
CC#
Created by Bailey on 7/16/2024 in #help
Reflection and customclass in list properties c#
Hi, I found the sollution for the problem. You pointet me to the rigt direction. the loop should be like below if (test is IList list) { foreach (var item in list) { Console.WriteLine(item); } }
18 replies
CC#
Created by Bailey on 7/16/2024 in #help
Reflection and customclass in list properties c#
this is thew for loop which i cant get to work. It cant recognise the list. Thats why I added comment above. I'll try tomorrow the feedback of Anton
18 replies