Questions tagged as 'c#'

1
answer

C # Code Conventions [duplicate]

I have some experience with Java and C. Recently I got a project in C #. I would like to know if there is a style guide from Microsoft or some other entity to find out how the C # programming style is.     
asked by 23.02.2017 / 21:23
1
answer

Conversion Monetary Amount to Double

I have the following value in Double: 1000.0 Using the command: string.Format(CultureInfo.GetCultureInfo("pt-BR"), "{0:C}", 1000.0); I have the output: $ 1,000.00 My Doubt is, how to convert $ 1000 to double, ie get output 1000....
asked by 31.01.2017 / 19:16
2
answers

Is it possible to make a synchronous call to WebApi?

Can non-asynchronous calls be made to WebApi ? I do not want my application to get hit by the method that runs the query with WebApi , I want it to wait for a response and take action according to the return, but all examples I...
asked by 31.01.2017 / 22:31
2
answers

loading date time without javascript

I wanted to know if it is possible to send direct from the controller, for example the current date and time of the system without using javascript. Ex: <div class="form-group"> @Html.LabelFor(model => model.DataAvaliacao, htmlAtt...
asked by 01.02.2017 / 00:54
1
answer

PrintOut from Microsoft.Office.Interop.word.dll only performs document printing with 1 page

Good morning everyone. I am using lib Microsof.Office.Interop.Word.dll to print a word document. When the document has only one page, printing works normally. The problem is when you have more than one page, it does not work. No error or...
asked by 31.01.2017 / 12:39
2
answers

How to access an HTML page and return your HTML using Xamarin.Forms?

I would like to know how I can access a page, example uol.com.br, and return your HTML. For together like this return try to use regular expressions with this HTML.     
asked by 29.01.2017 / 00:16
1
answer

Mock Authentication on dao

_usuario = CriaUsuario(new Login("Roberto"), new Senha("Senha")); var dao = new Mock<IUsuarioDao>(); dao.Setup(d => d.Autenticar(It.IsAny<Login>(), It.IsAny<Senha>())).Returns(_usuario); var usuario...
asked by 29.01.2017 / 03:52
0
answers

X-axis time of C #

I have the following graph in my Windows Form : IconfiguredtheXaxistodisplayTime,asshownbelow: BelowarethemethodsIcalldrawing:privatevoidfuncaoQualquer(){while(true){funcaoArray[funcaoArray.Length-1]=hScrollBar1.Value;Array.Copy(funcao...
asked by 30.01.2017 / 12:14
1
answer

Insert only items in a DropDownList that have already been used in the master data?

I would like to insert in the DropDownList only the sectors that have already been used in the contact register. In my ContatosController no ActionResult in method Index I did this, but the problem that is happenin...
asked by 29.01.2017 / 14:14
0
answers

Export Data to FireBase

I would like to export data to my DB FireBase . I have a service created in Visual Studio in C # that creates a list with name and price. I need to export this data to FireBase or export a txt file, if need be, I already do this. Note...
asked by 30.01.2017 / 14:19