Questions tagged as 'c#'

5
answers

How do I get the number of weeks in a date range in C #?

I would like to know how to know the number of weeks in a given date range in C #.     
asked by 17.02.2014 / 21:03
1
answer

"Untrusted domain" error when trying to connect to the database

When trying to connect to the database, I get the following error:    Login failed. The login is from an untrusted domain and can not be used   with Windows authentication. I'm using MVC 5 and below is my connectionstring . I'm not...
asked by 23.10.2014 / 21:33
1
answer

Scheduled Tasks on the Web

In Google Inbox, you can create reminders and postpone them to a certain date and time. The reminder is then taken from the main screen and when that exact date and time arrives it returns to the. In this way, the system schedules a task fo...
asked by 20.11.2014 / 21:21
1
answer

How to move and rotate where the mouse clicks?

I created a script in which my character moves around the mouse but has a problem: it is not spinning > Y , this is the condition I had to create for it to spin on the X axis: else if (target.x >= target.z) But I wish that when he...
asked by 19.10.2017 / 06:14
2
answers

How to implement an interface to guarantee a specific contract?

I need to make an interface implement a list of a certain type: public class ITrade<T> { public int date { get; set; } public double price { get; set; } public double amount { get; set; } public string type { get; set; }...
asked by 01.04.2018 / 20:47
3
answers

Format a string for phone format

I have the following string "49988070405" and I want to format it to "(49) 98807-0405" . I tried the code: Convert.ToUInt64("49988070405").ToString(@"\(00\)\ 00000\-0000"); But unsuccessful     
asked by 16.03.2018 / 22:18
1
answer

Difficulty in getting a certain type of return in C #

I have a return that I send via Ajax that it returns in the URL as follows: "http://localhost:11910/ProtocoloExterno/Inserir?itensContrato[0][id]=4&itensContrato[0][valorUsado]=150000,00&itensContrato[1][id]=9&itensContrato[1][valo...
asked by 14.05.2018 / 16:41
1
answer

Encrypting a string with SHA1 does not return the expected value

I am consuming a webservice nfse (electronic service invoice), and the nfse batch receiving function exists, the password is encrypted using the algorithm SHA1 . The Manual thus exemplifies: The password: "1234" should look like this: c...
asked by 19.04.2018 / 22:11
2
answers

How to make this type of signature in C #?

Is it possible to apply this signature type in C #? public class Teste { public void ver(Class<? extends Teste> tipo) { } } How?     
asked by 05.12.2017 / 18:20
1
answer

What name is given in C # when we use the expression "new {}"?

When I saw the use of the expression new {} I remembered Javascript, where I use new Object and {} are equivalent. Just for study purposes, I made some comparisons, to see if Csharp followed the same idea as Javascript, b...
asked by 08.01.2018 / 16:31