Questions tagged as 'c#'

2
answers

Get a specific value in an array

I'm trying to get only the name of an element from an array . I want to get the name of the first element of the array and also the name of the last element. I put my method in class Carreira public override string ToString() {...
asked by 06.03.2017 / 16:33
1
answer

How to choose the first form to be displayed?

When I run my project, fmPrincipal is always opened, however, I decided to create a fmLogin to be displayed first and the user to log in. How do I configure fmLogin to be displayed first?     
asked by 16.04.2017 / 17:25
2
answers

Loop for ATM

I need to run this code until the user prompts to exit. In the case, it will inform the result at the end and follow with a question to the user if he wants to continue using, hence the code executes again until the user exits. namespace Ca...
asked by 15.09.2017 / 22:45
2
answers

How to edit a Partial Class?

I took a project from a client and it has a class that is partial. When I click to go in the reference opens the file, but in the project I do not find the file, and has the following text in the class file: //---------------------------------...
asked by 30.07.2015 / 22:46
3
answers

Send a ListT with several items to the controller

Well, I'm facing the following problem in a project I'm working on: how to pass a list (List) with approx. 500 ~ 1000 lines from the View to the Controller? In fact, this list has a field called "Selected (bool)" from which the user selects o...
asked by 03.05.2016 / 19:59
2
answers

Check if SQL Server is installed C #

I am finalizing a C # application that contains a database in SQL Server. How can I tell if the user has the SQL Server 2012 Express Local DB installed? Can you check via registry on x86 and x64 ? Basically it would alert the us...
asked by 13.02.2016 / 04:07
3
answers

Unit tests with NUnit

I just installed the "Nunit" for unit tests in my project. I installed via Nuget on the VS2013 console. I put the annotations on top of my methods I ran Explorer test and gave a "Run ALL". This "Run ALL" is only compiling my project and...
asked by 03.12.2014 / 18:16
1
answer

Are there online programming learning environments with hands-on exercises and challenges for C #?

There are a few sites, such as URI Online Judge , which allow programmers to practice programming and share knowledge through specific exercises and logical and mathematical challenges. But some are restricted in language. The one mentioned...
asked by 22.11.2014 / 00:53
3
answers

Problem with Build in release mode C #

When attempting to build release mode release displays the following error message:    The mixed-mode assembly has been compiled against the runtime version 'v2.0.50727' and can not be loaded at runtime 4.0 without additional configuration in...
asked by 24.04.2015 / 16:17
1
answer

Delete files by extension

How can I delete files from one folder per extension? "I got" the files with this code: string[] arquivos = Directory.GetFiles(st.path, "*.xml", SearchOption.AllDirectories); But I do not know how to delete     
asked by 14.11.2017 / 17:57