Questions tagged as 'c#'

1
answer

High performance .Net website

I'm going to start building a website to buy tickets and the forecast for main page access is 8000 users per minute. We will use C # .Net and MVC. The database, project standard, ORM, and frameworks are open and can be chosen. So far I...
asked by 30.09.2015 / 04:59
1
answer

Same different result code (Visual Studio 2012 X dotnetfiddle.net)

Follow the image with the results on both platforms, is there any explanation or is it a bug in the online compiler? Both are console application , the only difference is that VS is being compiled with dotNet4 while dotnetfiddle.net dotn...
asked by 20.04.2015 / 21:44
1
answer

ProgressBar within a Task

How can I change the values of an interface control within a separate task from the main thread? Example: private void button1_Click(object sender, EventArgs e) { Task task = new Task(Processar); task.Start(); } pub...
asked by 29.04.2015 / 04:24
1
answer

Search all table fields in an Action

I would like to know how best to construct a query that looks in all the fields of a table. Let's say I have a news site, and on this site I have input to Search in my template. When typing the information in this template, it n...
asked by 29.04.2015 / 14:53
1
answer

Error opening SqlConnection

This is the following I have a gridviewer that is connected to a Query with a  Table named Server Table. When I want to add some things to the columns it gives the following error    Instance failure. In this part of the code connectio...
asked by 24.08.2016 / 16:42
1
answer

Problem with mysql connection in C #

I created a connection class for my application in Xamarin, but every time I try to connect it throws this exception:    "The type initializer for   'MySql.Data.MySqlClient.Replication.ReplicationManager' threw an   exception " Follow the...
asked by 20.08.2016 / 01:06
2
answers

Handle 404 error without using try / catch

I have the following code snippet that does an HTTP request , but sometimes the URL does not work, then an exception will be thrown by the framework . > HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); request.Method = WebRequ...
asked by 30.08.2016 / 14:06
1
answer

Retrieve value from an HTTP query string

I have a URL that returns an HTTP QueryString , and I need to retrieve the URL information and convert it to variables to query the database. In PHP just use $_GET[""] , now in C # I do not know how to proceed. I'll give you an ex...
asked by 19.01.2015 / 18:10
1
answer

Doubt when declaring enum with string [duplicate]

Declare an enum type string, like this: public enum SEXO { M = "Masculino", F = "Feminino" } How do I get an enum similar to the one above. This way give error:    Can not implicitly convert type 'string' to 'int'     
asked by 12.05.2016 / 14:22
1
answer

VS 2012 bundles to use or not to use, that's the question!

I'm starting in VS 2012 and between changes appeared bundles . I have some doubts: 1 - Is it worth using this approach? Why? 2 - The bundles should even be within the ScriptManager tag 3 - Can I continue referenci...
asked by 23.12.2014 / 14:06