Thinker
Thinker
CC#
Created by Dave The Magical Cheese Wizard on 4/20/2025 in #help
✅ I need help
Other than that, what kind of stuff do you want to make? Games? Desktop apps? Web apps?
11 replies
CC#
Created by Dave The Magical Cheese Wizard on 4/20/2025 in #help
✅ I need help
$helloworld is a good starting point
11 replies
CC#
Created by MainaJauro on 4/10/2025 in #help
Sending Email from C# Windows Form, Several Effort hasn't yielded any effort
$code
18 replies
CC#
Created by MainaJauro on 4/10/2025 in #help
Sending Email from C# Windows Form, Several Effort hasn't yielded any effort
Also can you please send your code and not an rtf file
18 replies
CC#
Created by MainaJauro on 4/10/2025 in #help
Sending Email from C# Windows Form, Several Effort hasn't yielded any effort
What language is this...?
18 replies
CC#
Created by vendeten on 4/7/2025 in #help
Wanting to make a basic, super simple, proof of concept platformer game in c#
If you feel more comfortable with Python then you could check out Pygame
9 replies
CC#
Created by vendeten on 4/7/2025 in #help
Wanting to make a basic, super simple, proof of concept platformer game in c#
Or are you required to do the project with nothing but C#?
9 replies
CC#
Created by vendeten on 4/7/2025 in #help
Wanting to make a basic, super simple, proof of concept platformer game in c#
Well, first step would probably be to pick a game engine if that's allowed.
9 replies
CC#
Created by VoidPointer on 4/5/2025 in #help
Too Much Indentation When Rendering a Scriban Template
tl;dr for all the {{ }} on their own lines, you'll have to use {{~ ~}} to strip the whitespace properly
4 replies
CC#
Created by gönnyd on 3/28/2025 in #help
Switch Expressions
-# granted if you didn't need that I assume you would be using INumber.Parse
17 replies
CC#
Created by gönnyd on 3/28/2025 in #help
Switch Expressions
Could also pass in the type as a generic, unless you really need to be able to pass arbitrary types
17 replies
CC#
Created by Faker on 3/26/2025 in #help
✅ What is a primary constructor in C#
It's somewhat odd, but you don't need to worry about it too much unless you already know what records are.
25 replies
CC#
Created by Faker on 3/26/2025 in #help
✅ What is a primary constructor in C#
in record L(string Z);, Z will become a property, but in class L(string z); you'll get an empty class with just a constructor
25 replies
CC#
Created by Faker on 3/26/2025 in #help
✅ What is a primary constructor in C#
Mind you again that primary constructors in records actually declare properties, which primary constructors in normal classes do not
25 replies
CC#
Created by Faker on 3/26/2025 in #help
✅ What is a primary constructor in C#
Reverse, the property Name is set to the parameter name
25 replies
CC#
Created by Faker on 3/26/2025 in #help
✅ What is a primary constructor in C#
eg. you can do this
class Foo(int num)
{
public void PrintNum()
{
Console.WriteLine(num);
}
}
class Foo(int num)
{
public void PrintNum()
{
Console.WriteLine(num);
}
}
25 replies
CC#
Created by Faker on 3/26/2025 in #help
✅ What is a primary constructor in C#
oh yeah, right, you can reference the parameters from the primary constructor elsewhere in the class
25 replies
CC#
Created by Faker on 3/26/2025 in #help
✅ What is a primary constructor in C#
-# There are some slight nuances, but those are quite fringe.
25 replies
CC#
Created by Faker on 3/26/2025 in #help
✅ What is a primary constructor in C#
If the constructor is public and you don't need any kind of functionality in the constructor besides initializing data, then a primary constructor is the same.
25 replies
CC#
Created by Faker on 3/26/2025 in #help
✅ What is a primary constructor in C#
These two are literally equivalent
class Person(string name, int age)
{
public string Name { get; } = name;
public int Age { get; } = age;
}
class Person(string name, int age)
{
public string Name { get; } = name;
public int Age { get; } = age;
}
class Person
{
public string Name { get; }
public int Age { get; }

public Person(int name, int age)
{
Name = name;
Age = age;
}
}
class Person
{
public string Name { get; }
public int Age { get; }

public Person(int name, int age)
{
Name = name;
Age = age;
}
}
25 replies