Looking for a practical way to format string I came across the following: Convert.ToUInt64(string).ToString(@"00000\-000") .
Is it a good practice to use this method to format strings ? Is there a recommended way?
Here...
I would like to know if you have a specific function or how to do it on the current working day, for example, today is the 26th day ie the 18th working day of the month and so it goes and as the month changes it starts again at zero and goes c...
I have the following list:
l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
What I need is to split this list into n sublists, in this case you can not do it manually since n is going to be dynamic.
Is there any contraindication in loading libraries .jar at runtime?
I found this code that does this:
URLClassLoader sysloader = (URLClassLoader) ClassLoader.getSystemClassLoader();
Class sysclass = URLClassLoader.class;
try {...
I have a class similar to this and wanted the code it executed to be passed as a lambda expression.
class T {
public:
double execute();
};
For example:
T t;
int a = 0, b = 1;
t.execute([a,b]()->double{return (3*a + 5*b);});
What...
I'm trying to encrypt my connection string , which is in my app.config .
After reading some forums, I saw that 2 methods need to be created:
class proteger_app
{
public static void Criptografar()
{
Configuration confi...
In some cases a function / method contains only one line in its scope, see the illustrative example:
static int Soma(int a, int b)
{
return a + b;
}
However, the new feature in C # 6.0 which allows declaring a function / method in lam...
I'm making a calculator for year-end activity, which even works normally, as long as it does not exceed typing. For example, if you make the sum of two fractional numbers, it sums all the sum correctly, but if you accidentally enter more than on...