I want to give return of two values in C #. My code is so currently, just returning imagePath , but I want to return imagePath and normalPath at the same time.
string imagePath = "~/Images/QrCode.jpg";
string norma...
Example:
I have the following string
"M1245D454"
I need only leave the numbers on it.
M and D, are examples, I want to remove any non-numeric character.
Is there any function in C # or VB.NET for this?
I was creating a template that in its construtor I set the Nome attribute. however, this attribute will only have get , as opposed to java oc # has the resource for getters and setters I thought I would simply d...
Today I use a method that sends a COUNT with the record Id as a parameter to the database. Is there a better, perhaps more performative way to do this?
Example:
nome = "Josénildo da Silva Ramos do Carmo";
Cut to have up to X characters, thus:
nome = "Josénildo da Silva ";
In the case I cut it to 20 characters.
How do I do this in C #? I only know in C (which is vector). In C # I...
In Visual Studio there is the Optimize Code that has the function of creating optimizations performed by the compiler to make your output file smaller, faster and more efficient.
Why can not I always use this option in my projects?
...
Is there any way to add multiple Int to a list<int> at a single time?
Type
List<Int32> ContasNegativas = new List<Int32>();
ContasNegativas.AddRange(30301, 30302, 30303, 30304, 30305, 30306, 30341, 30342, 30...
CS1503 Argument 1: Can not convert from "method group" to "object"
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Teste
{
class Program
{
stati...
I need to compare only the date of two fields DateTime .
DateTime aux = new DateTime(2016, 09, 02, 10, 0, 0);
if (aux.Equals(DateTime.Now))
{
//Alguma ação...
}
In the code above, I need to enter if when the date (09/02/20...
What I researched, if I did:
public int numero { get; set; }
is the same as:
private int numero;
public int Numero {
get{
return numero;
}
set{
numero = value;
}
}
But in the first code snippet every...