Tagged Questions
C# is a multi-paradigm programming language encompassing strong typing, imperative, declarative, functional, generic, object-oriented (class-based), and component-oriented programming disciplines.
0
votes
0answers
7 views
Dictionary with list of strings as value
I have a dictionary where my value is a List.
When I add keys, if the key exists I want to add another string to the value (List)?
ex.
Dictionary<string, List<string>> myDic = new ...
1
vote
0answers
11 views
Null checks in nested objects
I have several plain old C# objects that are returned by an API, and have several layers of POCOs nested within them. I need to access fields contained deep within these structures, but because the ...
0
votes
0answers
11 views
Treenode populating blank nodes C#
I have some code that creates treenodes for treeviews I have. Everything works fine for the two foreach loops, but the third one with 'warnNode' doesn't render the node text - just the connecting ...
-2
votes
0answers
33 views
Accessing some data through c# and java
I have a server for something in Java, and a client for it in C#. Now. When the client starts, I need the players to log-in, and then I need to pass the username and password to the server, somehow. I ...
0
votes
0answers
9 views
grid getting cut in half when loaded with half off screen
I have a listview, In the list view you can click on an order number and it will pop up a grid to edit details about the order!
This grid it pops up is Drag-able via this code(tt is a ...
0
votes
0answers
5 views
Master Page property and performance
I'm using ASP.NET Membership and I have a table called UserProfiles which has a 1:1 relationship with aspnet_Users on UserId to store lots of extra fields. One of those fields is OrganisationID which ...
-1
votes
2answers
26 views
c# Get process window titles
proc.MainWindowTitle.Contains("e")
How does one get the window titles of all the current windows containing "e" open instead of just the Main Window using the "MainWindowTitle" and store them ...
0
votes
0answers
19 views
Ensuring that the main thread doesn't die before execution of all an asyncronous method
I have a function which needs to poll a certain server to obtain the status of a job I sent it. It is of the form:
public Foo PollForJobOutcomeAsync(int pollSpan, Action<Foo> callback)
{
...
-1
votes
0answers
60 views
Logging into a website in C#
I'm developing a Windows Forms application and would like to automatically log in to a website and scrape some of my account information. I have been doing this through a WebBrowser object but would ...
0
votes
2answers
47 views
At the end of an async method, should I return or await?
At the end of a Task-returning async method, if I call another async method, I could either await it or return its task. Which are the consequences of each?
Task FooAsync()
{
return ...
0
votes
1answer
17 views
Free end-user reporting solution for .NET application
I'm in the process of designing a C# application that lets users query a SQL Server or Oracle database (using a visual query builder) and then generate PDF reports based on those specific queries ...
0
votes
1answer
20 views
“WINDOWS INSTALLER” is not adding the program into start menu
I created a windows form application for my C# project using this guide. However I selected "setup wizard". It created a nice installer but the issue is when the program is installed, it is not ...
-3
votes
2answers
31 views
SQL error: must declare a scalar variable
I am trying to get the unique auto-generate key for the last SQL insertion:-
INSERT [db].[xyyz] (x,y,z) values (@x,@y,@z)
SET @RowId = SCOPE_IDENTITY();
command.Parameters.AddWithValue("@x", x);
...
1
vote
3answers
52 views
c# Contains multiple words not together
if (r.Contains("Word1" + "Word2"))
This code checks if "Word1" and "Word2" are in the string together e.g. nothing in between them but how does one check if the string contains those two words ...
0
votes
0answers
6 views
ModalContentPresenter with Caliburn.Micro
I am trying to find ways to properly show non-window based modal dialogs (ie. they cover existing part of the window and are shown on top of that content in a modal way - the covered part is not ...