NotFabi
NotFabi
CC#
Created by NotFabi on 10/25/2023 in #help
❔ View Designer for Forms App
okay i fixed it
6 replies
CC#
Created by NotFabi on 10/25/2023 in #help
❔ View Designer for Forms App
oh i found something, a message from visual studio: "The class Form1 can be designed, but is not the first class in the file. Visual Studio requires that designers use the first class in the file. Move the class code so that it is the first class in the file and try loading the designer again."
6 replies
CC#
Created by NotFabi on 10/25/2023 in #help
❔ View Designer for Forms App
i tried rebuilding, cleaning up and building, but it doesn't seem to work
6 replies
CC#
Created by NotFabi on 9/27/2023 in #help
✅ Tuples or Reference when returning multiple Variables
Okay, thanks! blobthanks
17 replies
CC#
Created by NotFabi on 9/27/2023 in #help
✅ Tuples or Reference when returning multiple Variables
i know that this is a bad example, but let's say you have to perform calculations on both the x and y coordinates. so lets say you now have this:
private static void GetXY(ref double x, ref double y, Coordinate coord)
{
x = coord.X + 1;
y = coord.Y - 2;
}

private static (double, double) GetXY(Coordinate coord)
{
return (coord.X + 1, coord.Y - 2);
}
private static void GetXY(ref double x, ref double y, Coordinate coord)
{
x = coord.X + 1;
y = coord.Y - 2;
}

private static (double, double) GetXY(Coordinate coord)
{
return (coord.X + 1, coord.Y - 2);
}
this is just a pointless example, there are for sure better ones. but should i use tuples or reference when i have a function that returns 2 or more values
17 replies