Questions tagged as '.net'

1
answer

Static methods X Non-static methods for data access layer

I'm creating a layer in ADO.NET for data access and painted a doubt. Is it a good practice to have my data access methods as static instead of having to always instantiate the object and call the method?     
asked by 31.03.2016 / 20:47
1
answer

How is this class working? [closed]

DataSet OleDbConnection OleDbCommand OleDbDataAdapter OleDbDataReader I still can not understand this class in .NET. What is the purpose of these dataSets and etc? I'm using this: using System; using System.Collections.Generic; using System....
asked by 08.02.2016 / 14:29
1
answer

How to insert date and time in oracle? via c #

I'm developing a desktop application and it was working fine until the time I tried to insert the date and time generated by C # into a table in oracle. Can someone teach me the query to insert date into this format: 21/07/2018 12:54:35: (dd/m...
asked by 11.05.2018 / 16:12
3
answers

The user will have 3 attempts to set the password

The next form does not open when the password is correct and if it is wrong it continues even if the password has been entered 3 times. private void btnEntrar_Click(object sender, EventArgs e) { int erro=0; if (senha != ""...
asked by 25.05.2018 / 07:41
1
answer

If you can run other undesirable lines [closed]

I want to make a program that allows you to manipulate and manage information about CDs that is stored in a text file. The file should save for each CD, author / group name, CD name, year of edit, publisher name, total time (in minutes) and n...
asked by 14.10.2016 / 18:29
1
answer

Improve the performance of a method with pointers

Here's the code working: string string_pick(string text, string tag, char caractere) { int index = text.IndexOf(tag); return text.Substring(index + tag.Length, text.IndexOf(caractere, index + tag.Length + 1) - (index + tag.Length)); }...
asked by 17.06.2016 / 01:20
1
answer

How do I get the MemberNames property with the index?

I started programming in C # a short time ago and I'm doing a validation treatment using Data Annotation with windows forms, I'm having a problem that I can not get the MemberNames property of the IEnumerable Interface by index, how can I get th...
asked by 25.08.2018 / 05:07
3
answers

Place spaces between letters of a text [closed]

Since a given string like "Something" has spaces between the letters, for example "A l g u m a C o i s a"; how do I do this in C #?     
asked by 26.08.2018 / 16:43
1
answer

What is the error in the conditional? [closed]

What is the error in the conditional below and how to solve it? private void Botão_Click(object sender, EventArgs e) { if(Pbox.Show();) Pbox.Hide(); else(Pbox.Hide();) Pbox.Show(); } private void Pbox_Click(object send...
asked by 25.05.2017 / 10:30
1
answer

Compile error in code in Unity [duplicate]

ThisislikeusingUnityEngine;publicclassPlayerMovement:MonoBehaviour{voidAwack(){floorMask=LayerMask.GetMask("Floor"); anim = getComponet <Animator> (); playerRigidbody = GetComponent <Rigidbody> (); }...
asked by 04.09.2015 / 20:35