Questions tagged [c#]
C# (pronounced "see sharp") is a high-level, statically typed, multi-paradigm programming language developed by Microsoft. C# code usually targets Microsoft's .NET ecosystem, which include .NET, .NET Framework, .NET MAUI, and Xamarin among others. Use this tag for questions about code written in C# or about C#'s formal specification.
92
questions
0
votes
0
answers
6
views
Content being duplicated in asp.net web forms page
Can anyone help with the following problem
I am building a nested template website using Web Forms and C# (.Net 4.8) and I keep getting issues with content being duplicated in asp controls e.g the ...
-1
votes
0
answers
11
views
image display above cell issue how to solve issue using itextcharp?
I work on asp.net I export grid view to pdf and I success on that
issue happen when add image logo to pdf it display above logoCell not inside cell .
so issue logo image display above logo cell .
and ...
0
votes
0
answers
6
views
Monitor progress of python from within c# using python.net
From within c#, I am executing python.net to build a RandomForestClassifier. After I have loaded the data and put it in a format for the classifier, using python.net I execute:
scope.Exec("...
0
votes
0
answers
12
views
Coverlet doesnt calculate code coverage for tests until another test is added
we have 700 tests in our solution and we use the latest .net and latest coverlet.
3 test files in 1 (out of 30) test solutions are not calculated correctly:
But the tests are executed:
The ...
0
votes
0
answers
10
views
Service Bus Output in the Isolated Worker Model - .NET8 Function App
I have a function app that we are upgrading from the In-Process Model to the Isolated Worker Model.
Below I have a dumbed-down, pseudocode version of what I am working on with the relevant method ...
0
votes
0
answers
8
views
Adding global attributes to OpenTelemetry metrics
I am using OpenTelemetry's Metrics to get information about my environment.
I have several tenants that will use OpenTelemetry and will all be ingested into Prometheus and then Grafana.
I would like ...
0
votes
0
answers
3
views
Decreasing Unity resource usage when sitting in a menu
I was wondering if there is any way to lower the amount of resources that Unity uses when its ostensibly not doing anything - such as sitting in a menu that isn't animated. This is something that ...
-1
votes
0
answers
22
views
How to add substrings to an array?
I want to add to an array the substrings that this loop creates
foreach (char c in chars)
{
do
{
sb.Append(chars[i]);
choice = sb.ToString();
} while (c == chars[i]);
}...
-1
votes
0
answers
16
views
How to hide tabpage in C#, you can't, but you can
OK You can't hide a TabPage in .NET as there is no visible property. However, you can have a MISC Tab and have several GroupBoxes on it which do have the Visible Property.
Your MISC tab would have ...
0
votes
1
answer
8
views
Error Factory.Domain.FetchInstance(connection, null, null) in c# not connect
I am trying to connect to the FileNet server with Factory.Domain.FetchInstance(connection, null, null) and it generates an error:
Por favor me pueden colaborar.
The program runs fine, but when it ...
0
votes
0
answers
13
views
.NET Integration Test Singleton Service instantiated twice
I am working on a .NET SQL Server based application for which I need to write Integration tests.
I am using CustomWebApplicationFactory to overide DbContextFactory to use an in-memory SQLite DB in ...
0
votes
0
answers
8
views
How can i decrypt a pushbullet message with C#?
Good day, i want to decrypt the messages i receive through the API https://api.pushbullet.com/v2/permanents/%7Biden%7D_threads but when using my E2E key in C# and generating a desencryption key it ...
0
votes
0
answers
3
views
C#, BluetoothLEAdvertisementWatcher hangs unexpectedly
I have created a hardware product that does a specific thing and sends data within a Manufacturer chunk of an advertisement packet. I've already written a fully functional app for iOs/Android for this ...
0
votes
0
answers
6
views
UWP ExpandoObject PropertyChangedEvents are not Updating UI
My task is to implement a UWP DataGrid with dynamic columns. As the user adds and remove columns, I need to add and remove the corresponding properties during runtime from the ObservableCollection of ...
0
votes
0
answers
8
views
C# .net core 6.0 - IQueryable, odata, and mapped function called from LINQ statement can't be translated
I'm having issues with odata, IQueryable's and mapped functions called from LINQ statements:
this is in a function (creating an IQueryable):
IQueryable<AvailableView> queryable = _aContext.AView....
-1
votes
1
answer
18
views
Entity Framework Core : Select() - change a column name
I have the following select:
var allUsers = await dbContext.AppUsers
.Where(u => allUserIds.Contains(u.IdentityUsersId))
.Include(u => u.Following)
.Select(u => new
{
...
-2
votes
1
answer
24
views
Entity Framework Core : Select() - turn an IList<> property into a joined string?
I have the following select which returns the 4 columns I want:
var allUsers = await dbContext.AppUsers
.Where(u => allUserIds.Contains(u.IdentityUsersId))
.Include(u => u.Following)
...
0
votes
0
answers
12
views
Retrieve iProduct and iSerialNumber from connected USB device
I have a PCB with an MCU that has a USB peripheral on it connected to a PC and I'm writing a UI to work with it. The USB port is configured in the device as a Comm port, so it looks like "COMx&...
0
votes
0
answers
8
views
How to test IObservable with rx.net
I have method like:
public IObservable<int> Move()
{
byte[] header = { <some data> };
return _joystickService.JoystickXY()
.Sample(TimeSpan.FromMilliseconds(200))
....
0
votes
1
answer
21
views
Can you have init-once variables in C# extension methods?
Extension methods operate on an instance of a class, but they are implemented as static methods inside a static class. It seems that they don't allow declaring any variables static or readonly.
Here ...
0
votes
0
answers
13
views
My character does not do what I expected him to do and I dont know why
I am making a 2d game in unity and I haven't touched a game engine in months but I found this movement script I had saved which I wrote a while ago, I set everything up and when I was going to try, my ...
0
votes
0
answers
16
views
SHOpenFolderAndSelectItems Win32 API doesn't work on Go, but works on C#
I am trying to open a Windows Explorer window with specified items in a particular folder selected.
I tried to implement the program using SHOpenFolderAndSelectItems Win32 API with C#. Following the ...
0
votes
0
answers
20
views
How can I get the values from Shell Property 'System.ItemAuthors' as a string array in C#?
I’m at a complete loss on how to do this. I’ll preface by saying I’m able to get many shell properties for a file when they are of type uint64, uint32, DateTime, string, etc. as the example code shows....
0
votes
0
answers
16
views
How to send/receive text messages in Blazor App
For fun, I wanted to make my own default texting app and make it compatible for both IOS and Android. As far as I can figure, Blazor doesn't support it. I was wondering if there was a good API for ...
0
votes
0
answers
25
views
DLL Injection Hook Not Working in WPF Application
i am student studying reverse engineering.
These days, I am learning API Hook using DLL Injector
I made personal DLL Injector using C# WPF and C++/CLI
also i have created a DLL that hooks the send ...
0
votes
0
answers
18
views
Get a list of Computers on the network, their IP Addresses, and UNC Paths
I have been working on this for the last week and I've tried a ton of different approaches and haven't found anything that works consistently.
Essentially, I am trying to build my own FolderDialog and ...
0
votes
0
answers
13
views
Entity Framework Core 8.0.7 DB-first Scaffold-DbContext database with custom namespace
I'm using EF Core 8.0.7 and a database-first approach.
When I'm running Scaffold-DbContext on the database with the command shown here, I'm getting semicolon after namespace and class is not any name ...
1
vote
0
answers
23
views
Adding an embedded font to a datagridview
I want to put a custom font to a datagridview but it is not applied, it only applies to other elements such as labels.
I originally tried this and it worked as expected.
fontCollection.AddFontFile(&...
0
votes
0
answers
9
views
How to add new column to existing abp table __core_EntityPropertyChange
I am using abp(aspnet boilerplate) framework. There is framework build table __core_EntityPropertyChange for auditing purpose.
Since this is framework build table so I am unable to add new column to ...
-1
votes
0
answers
17
views
Replacing a sentence that has citations in a DOCX file as Track Changes
I trying to replace a sentence instead of old one (which has citations) in a DOCX document using OpenXmlRegex.Replace method.
The thing is creating the regex of old sentence and using it for replace ...