Questions tagged as 'c#'

3
answers

Check for function existence in C #

How can I check if a function exists in C# ? I think I have to use some kind of reflection, but I do not know much about it. Is there a way to get the function's argument list, if it exists? For example: public class ClasseA { public...
asked by 03.04.2017 / 16:39
1
answer

Get HTML href attribute in C #

I have the following code in a Razor view: <div id="HTMLreturned" class="row"> @Html.Raw(ViewBag.HTMLreturned); </div> <script> var nrLinks = 0; $(".enlacesMas > a").each(function(){...
asked by 16.03.2017 / 18:10
1
answer

Include optional Entity Framework

I have a big question here with regards to Include of the Entity Framework. var ocorrencias = db.Ocorrencia .Include("Pessoa") .Where(c => c.Id > 1000).ToList(); I used Include because I need the object...
asked by 22.03.2017 / 01:26
1
answer

Connection Error C # PostGree - Locaweb [duplicate]

I have a webservice consuming postgreesql data and when I try to connect to the base after posting. The host I'm trying to use: "serveripanema.no-ip.info"    Npgsql.NpgsqlException: Failed to establish a connection             to '177.195.4...
asked by 04.04.2017 / 23:03
1
answer

Upload to Drive [closed]

Personal I have the following code, which opens the consent form of google, where the authorization of the user is made and an authentication token is generated: public async Task<ActionResult> IndexAsync(CancellationToken cancellationTo...
asked by 04.04.2017 / 19:12
1
answer

How to enable Migrations using the Entity Framework Core = Windows Forms C #

I'm testing EF Core in a Windows forms project following the DDD standard. In the repository layer I created my context and in my domain I already have the defined Models classes. How do I activate Migrations in EF Core so that I do not have to...
asked by 22.03.2017 / 00:33
1
answer

How to change the app.config file at run time?

How can I change the app.config file at run time? I want to change the connection string: <add name="WiconEstoqueDataContextConnectionString" connectionString="User Id=USER;Password=PASS;Host=HOST;Database=wicon_estoque;Persist Security...
asked by 06.03.2017 / 14:23
2
answers

Is there a difference between the use of underscore and .this?

From what I've seen, underscore is used for internal class variables: class Pessoa { private string _nome; public Pessoa(string nome){ _nome = nome; } } In this case, would the use of .this be that way? class Pessoa {...
asked by 01.10.2017 / 16:11
1
answer

Force user to select the Radio Button inside the GroupBox

How do I force user to select a Radio Button within the GroupBox. Image example below     
asked by 05.10.2017 / 18:07
2
answers

Filtering for empty children

I have two entities ( TipoDeRequerimento and TipoRequerimentoSituaçãoAcademica ) in my query. Today I can make a filter to bring the Types of requirements that have a certain academic situation pre-registered. Now I need this filt...
asked by 04.10.2017 / 02:23