Posts by João Paulo Amorim • 245 points
5 posts
-
1
votes7
answers1103
viewsA: Remove part of string until nth occurrence of a character
With Array class Program { static void Main(string[] args) { string test = "0001>0002>0003>0004>0005"; var testSplit = test.Split('>'); string testJoin = string.Empty; for (int i = 0;…
-
3
votes1
answer5597
viewsA: ERROR The index was outside the matrix limits (System.Indexoutofrangeexception)
You added value to the size_array variable after it was popular, remove ++ or change the while condition to (n < size_array) string usuario = Environment.UserName; string palavra =…
-
4
votes3
answers92
viewsA: Leave date only on the datatime, without the hours part
Change the type of the Cba_dt_string open object to Datetime, then when the list is popular put the code below. try { var result = new HttpResponseMessage(HttpStatusCode.OK); var bancos =…
-
1
votes3
answers231
viewsA: how to insert a select command into the BD using c#?
Depending on the C# version you are using you can use it like this public OracleDataReader VerificarComandoExistente(string descricao) { strQuery = $"select * from comando where comando =…
-
0
votes4
answers1423
viewsA: How to build custom queries using Entity Framework?
await _context.Produtos .Where(x => (pesquisa.Nome == null || x.Nome == pesquisa.Nome) && (pesquisa.Material == null || x.Material == pesquisa.Material) && (pesquisa.Estado ==…