HowNiceOfYou
HowNiceOfYou
CC#
Created by quit on 3/9/2023 in #help
✅ Need help fixing CallbackData
pong
72 replies
CC#
Created by Sticks on 2/11/2023 in #help
❔ Questions about popups
You mean rounded edges?
9 replies
CC#
Created by Tony on 2/10/2023 in #help
❔ Program does not contain static 'Main'
Have a look, compare it.
15 replies
CC#
Created by Tony on 2/10/2023 in #help
❔ Program does not contain static 'Main'
It'll work.
15 replies
CC#
Created by Tony on 2/10/2023 in #help
❔ Program does not contain static 'Main'
Or use that code.
15 replies
CC#
Created by Tony on 2/10/2023 in #help
❔ Program does not contain static 'Main'
using System.Collections.Specialized;
using System.Security.Cryptography.X509Certificates;
class Player
{
public string _playerName;
public int playerID;
public Player(string playerName, int playerIdentifier)
{
_playerName = playerName;
playerID = playerIdentifier;
}
}
class Program
{
static List<Player> Players = new List<Player>();
static void banPlayer(string _playerBan)
{
foreach (Player _player in Players)
{
if (_player._playerName == _playerBan)
{
Players.Remove(_player);
Console.WriteLine("ID: " + _player.playerID + " has been removed");
}
}
}
static void Main()
{
string[] input;
while (Players.Count < 5)
{
input = Console.ReadLine().Split(' ');
Player player = new Player(input[0], Int32.Parse(input[1]));
Players.Add(player);
}
banPlayer(Console.ReadLine());
}
}
using System.Collections.Specialized;
using System.Security.Cryptography.X509Certificates;
class Player
{
public string _playerName;
public int playerID;
public Player(string playerName, int playerIdentifier)
{
_playerName = playerName;
playerID = playerIdentifier;
}
}
class Program
{
static List<Player> Players = new List<Player>();
static void banPlayer(string _playerBan)
{
foreach (Player _player in Players)
{
if (_player._playerName == _playerBan)
{
Players.Remove(_player);
Console.WriteLine("ID: " + _player.playerID + " has been removed");
}
}
}
static void Main()
{
string[] input;
while (Players.Count < 5)
{
input = Console.ReadLine().Split(' ');
Player player = new Player(input[0], Int32.Parse(input[1]));
Players.Add(player);
}
banPlayer(Console.ReadLine());
}
}
15 replies
CC#
Created by Tony on 2/10/2023 in #help
❔ Program does not contain static 'Main'
Easy solution.
15 replies
CC#
Created by Tony on 2/10/2023 in #help
❔ Program does not contain static 'Main'
Make everything else static then.
15 replies
CC#
Created by Binto86 on 2/10/2023 in #help
✅ ✅ Use function that has default implementation in interface from instance of class
Your code should work?
9 replies
CC#
Created by Binto86 on 2/10/2023 in #help
✅ ✅ Use function that has default implementation in interface from instance of class
You're correct, I apologise.
9 replies
CC#
Created by Binto86 on 2/10/2023 in #help
✅ ✅ Use function that has default implementation in interface from instance of class
Hold on....
9 replies
CC#
Created by Binto86 on 2/10/2023 in #help
✅ ✅ Use function that has default implementation in interface from instance of class
Wait, am I dumb?
9 replies
CC#
Created by Binto86 on 2/10/2023 in #help
✅ ✅ Use function that has default implementation in interface from instance of class
You would need to either move the implementation of DoMultipleThings to the Bar class, or create a base class that implements the method.
9 replies
CC#
Created by nukleer bomb on 2/10/2023 in #help
❔ `delegate*` wrapper throws `System.BadImageFormatException`
Have you tried my suggested code?
78 replies
CC#
Created by nukleer bomb on 2/10/2023 in #help
❔ `delegate*` wrapper throws `System.BadImageFormatException`
Sorry, didn't read that part. Uhm you can make changes to the Call. I think this will work.
public TRet Call(TArg arg = default)
{
if (typeof(TRet) == typeof(Unit))
{
if (typeof(TArg) == typeof(Unit))
((delegate* unmanaged<void>)ptr)();
else
((delegate* unmanaged<TArg, void>)ptr)(arg);

return default!;
}
else
{
return typeof(TArg) == typeof(Unit) ?
((delegate* unmanaged<TRet>)ptr)() :
((delegate* unmanaged<TArg, TRet>)ptr)(arg);
}
}
public TRet Call(TArg arg = default)
{
if (typeof(TRet) == typeof(Unit))
{
if (typeof(TArg) == typeof(Unit))
((delegate* unmanaged<void>)ptr)();
else
((delegate* unmanaged<TArg, void>)ptr)(arg);

return default!;
}
else
{
return typeof(TArg) == typeof(Unit) ?
((delegate* unmanaged<TRet>)ptr)() :
((delegate* unmanaged<TArg, TRet>)ptr)(arg);
}
}
78 replies
CC#
Created by nukleer bomb on 2/10/2023 in #help
❔ `delegate*` wrapper throws `System.BadImageFormatException`
You can pass the default value for the TArg type instead of null. For example:
var ptr = new FuncPtr<Unit, int>((nint)x);
Console.WriteLine($"FuncPtr = {ptr.Call(default(Unit))}");
var ptr = new FuncPtr<Unit, int>((nint)x);
Console.WriteLine($"FuncPtr = {ptr.Call(default(Unit))}");
78 replies
CC#
Created by TotechsStrypper on 2/10/2023 in #help
✅ Does azure function really cheaper than app service when trigger http ?
Azure Pricing Calculator.
6 replies
CC#
Created by TotechsStrypper on 2/10/2023 in #help
✅ Does azure function really cheaper than app service when trigger http ?
Yes, you are correct that Azure Functions charges based on the number of requests made to it, whereas Azure App Service charges based on the number of hours the app is running. In the case of an enterprise app with 100,000 users, you'll likely have a large number of requests being made to the Azure Functions, which could result in high costs if the function is triggered frequently or around the clock. In this case, you may want to consider using Azure App Service instead as it charges based on the number of hours the app is running, which could be more cost-effective for you in the long run. It's worth mentioning that the choice between Azure Functions and Azure App Service ultimately depends on the specific requirements of your enterprise app. You should consider factors such as scalability, ease of use, and performance when making your decision. It might be helpful to run cost simulations.
6 replies
CC#
Created by itgel9462 on 2/10/2023 in #help
✅ WPF
I've never worked with speech recognition so I can't give you any tips, sorry man.
81 replies
CC#
Created by itgel9462 on 2/10/2023 in #help
✅ WPF
Well first can you tell me the problem, then just send it in a txt format.
81 replies