Questions tagged [c#]

Lô đề online C# (pronounced "see sharp") is a high level, statically typed, multi-paradigm programming language developed by Microsoft. C# code usually targets Microsoft's .NET family of tools and run-times, which include the .NET Framework, .NET Core and Xamarin among others. Use this tag for questions about code written in C# or C#'s formal specification.

Filter by
Sorted by
Tagged with
-1
votes
0answers
8 views

Visual Studio does not debug in real time

I'm using a visual studio to develop games in Unity. For visual studios, codes that are not properly written are underlined in red with errors. But my visual studio doesn't. I'm using the Visual ...
0
votes
0answers
7 views

How to get remote host status by using Connectivity Plugin 4.0?

I want to ping remote host and get his status I created function like this: public async Task<Boolean> Connect_Test(string ip,int port) { var isReachable = await ...
2
votes
1answer
23 views

When creating a class array its members are still not instantiated [duplicate]

Sorry for the stupid question! Why do I get a NullReferenceException: Object reference not set to an instance of an object? public class myTestClass { public string testString; } public class ...
2
votes
0answers
16 views

C# Entity Framework .ToList() on IQueryable gives error System.Data.SqlTypes.SqlNullValueException: Data is Null

I have seen some variants of this issue in the past, but none of them have applied to my issue, so I am starting a new one. I have a Model called Transactions. It has a string called TransactionNumber ...
0
votes
0answers
13 views

InMemory DB doesn't return nested objects

I have an entity that looks like this: public class Worker { public string Id { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public string ...
0
votes
0answers
11 views

Button onclick not triggered following OnClientClick jQuery popup javascript

I have a c# .net page with a button control with an OnClientClick that informs the user they are about to submit some collected information. And an OnClick event that performs some validation and then ...
0
votes
0answers
6 views

Changing skin in unity3D

I downloaded This asset and wrote this code for switch between skins : static GameObject LoadSkin(int skinID) { return AssetDatabase.LoadAssetAtPath<GameObject>($"Assets/BodyGuards/...
-1
votes
0answers
11 views

How to automatize the building, create an installer and publish of a .net windows form application [closed]

I am looking for frameworks of continuous integration and deployment for windows form .net application. I did a research but I failed in the attempt without finding anything. Right now the software is ...
0
votes
0answers
15 views

How can I search in bson document [closed]

Hi I have a complex bson document and would like to navigate, search or iterate thourgh this bson file with C#. The thing is, that I have already the bson document in the code so I can't use filter ...
0
votes
0answers
15 views

does async use worker thread from the threadpool?

I'm new to C# and async programming, sorry if my question sounds dumb. Let's say we have the following code: static void Main() { SomeMethod(); Console.WriteLine("Main program almost ...
-1
votes
0answers
15 views

Adding float numbers in c# [duplicate]

I doing uni work where I have to add numbers together, in this particular case it is a float. Here is the code for it: public float CalculatSum2(float number1, float number2) { // ...
-2
votes
0answers
13 views

C#: Find substrings in a file text starting and ending with specific words [duplicate]

I am reading text file contents in a string. I want to replace substrings in these contents wherever I find substring enclosed within a set of certain substrings, with repeated occurence of substrings....
0
votes
0answers
6 views

.Net Winforms Manipulate Word Document “Page number”

Main Question: How do I use OpenXML via c# to change a word document page number? End Goal: Manipulate Word Document to change its page number. What I have tried/where I have looked: I have looked at ...
0
votes
1answer
12 views

How can I catch error from EPPlus where file doesn't exist?

I have function who take FilePath and return all of Excel information into a List. My actual problem is not the function, but the error system who don't work if my FilePath is bad or file not exist. I ...
0
votes
0answers
14 views

Linq to SQL return list objects

I have this model that joints two table cars and model. I can only see the data within the model. So if it returns two models it will on only display one record. I am trying to have to return a list ...

15 30 50 per page
1
2 3 4 5
96227