Questions tagged [c#-4.0]

C# 4.0 introduced features like dynamic objects, COM interoperability improvements, generic co- and contra-variance, optional and named parameters. Use this tag if your question specifically pertains to C# 4.0 specific features. The C# tag should be used if your question is not specific to C# 4.0 features.

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

Generate XML using C# [closed]

As stated in the title I want to write an XML file using C# scripting. By follow the solution from another question asked on stackoverflow (Link to the post: generate xml files based on my c# classes) ...
Stefan Roelands's user avatar
0 votes
0 answers
24 views

Creating SSIS Custom Component - PreExecute method cannot get connection manager

I had trying my hands on creating a SSIS custom component to retrieve data from Salesforce. I having the custom connection manager project working and verified, and the custom source works and ...
Shaggy's user avatar
  • 179
0 votes
1 answer
16 views

How do I create VBA code that is associated with a particular worksheet in C#?

I wrote a program in VBA a number of years that reads in files and builds a macro enabled spreadsheet. It works reasonably well. I am rewriting this code in C# with enhancements. The problem that I ...
Steve5785's user avatar
0 votes
0 answers
16 views

How to get all tracklog of member in club (with name athlete and time start every run) Strava through API V3

I write a service get data from club Strava for Running Club. I want show on dashboard with some infor like that: fullname, distance, moving_time, elapsed_time, time start tracklog, ... I call api api/...
caocuongccc's user avatar
-1 votes
0 answers
19 views

Modify the XAML content from outside the class

I have created two display links in my XAML modern window that navigate within the same XAML page. To achieve this, I implemented a method inside the class that belongs to the XAML page, ensuring that ...
Amila's user avatar
  • 1
0 votes
1 answer
83 views

Coding C# Visual Studios Email

im struggeling to use visual studios coding in C# to be able to email from a project, getting plenty errors, what should i do and can somebody help me code a program that can email in c# please. here ...
Brandon Jubber's user avatar
0 votes
0 answers
20 views

Question about storing a mobile application (specifically on Android)

I have a question about storage of 1 app game. when access Storage, they have 3 parts: App - Data-Cache. According to my understanding, App contain core part about code and anything in build, It will ...
Excellent AC's user avatar
0 votes
0 answers
18 views

Working in Visual Studio in Immediate Window: error CS0103: The name 'g' does not exist in the current context

In the immediate window I create a new class with the name g. When I ask for the content of g, the error occurs. Groepsreis g = new Groepsreis ("London", 10, 125.1); Expression has been ...
Veerle De Cock's user avatar
0 votes
1 answer
49 views

How to mock ProcessMessageEventArgs object to pass as a parameter in a method from a test method in c#

I am writing a test method for below mention method - Method in my concrete class - public async Task ReadServiceBusMessage(ProcessMessageEventArgs args) { // Some code } -- In my test method- ...
Rajesh Thakur's user avatar
0 votes
1 answer
35 views

Aligning the transcribed text with specific timestamps in the audio

is it possible in Azure or are there services in Azure that I can use to get the position of each plain text based from the spoken words of the source Video? Basically, I have a plain text that ...
chaw's user avatar
  • 1
0 votes
1 answer
39 views

Unable to retrieve attribute names/values from XmlReader after validation in C#

I need to write a c# code to extract attribute info from an XML when the validation fails. The code I have below is able to give me the exact attribute that fails the validation but I need additional ...
Sheva's user avatar
  • 37
0 votes
0 answers
41 views

Error The remote procedure call failed. (Exception from HRESULT: 0x800706BE)

I am reading one excel file which is first download on the system then my code read the excel file but i am getting the error- The remote procedure call failed. (Exception from HRESULT: 0x800706BE) ...
Gopal Kanjolia's user avatar
0 votes
0 answers
28 views

Problem returning a web api when changing servers

The scenario I am facing is the following, a server migration was carried out at the company where I work and on the old server where it was hosted the Web API service worked normally, however when ...
user13085676's user avatar
-1 votes
1 answer
21 views

File Operation for storeing,read and load data,function for newly registred employees

1)Create a file for storing employee data. 2) Implement a function to read and load employee data from the file into objects when the application starts (if the file exists). 3)Implement a function to ...
divya d's user avatar
2 votes
0 answers
93 views

Best Practice for disable automatically deactivating .NET ActiveX Controls in VB6?

I'm porting an old Visual Basic 6 program. I deployed the migrated component in WPF and provide that component as an ActiveX control (C#, Windows Forms, .NET Framework) to add the control temporarily (...
Michael's user avatar
  • 133
0 votes
0 answers
17 views

Unable to find version '0.4.0.203' of package 'SolrNet'

I am rebuilding C# project and getting below error. Unable to find version '0.4.0.203' of package 'SolrNet' I try to install that version through here but not able to find that speicfic version I need ...
tech's user avatar
  • 1
1 vote
0 answers
13 views

C# / .NET 7 : Shopify Uninstall Webhook returns null response

I am building a shopify app and the uninstall webhook is not working as intended [HttpPost] public async Task<StatusCodeResult> AppUninstalled([FromQuery] string shop) { // .... // .... ...
onyaga's user avatar
  • 11
0 votes
1 answer
38 views

Implementing Single CRUD operation for more than 30 of tables

One of my questions is closed due to insufficient information so I written another with detail. I want to write a blazor app in c# & .netCore plateform using Visual Studio 2022. Such app will be ...
Alamdar Khan's user avatar
0 votes
0 answers
49 views

Microsoft.ACE.OLEDB.16.0 provider is not registered on the local machine. (Use MS Access 2016)

I'm trying to connect to an Access database in my C# code, but I keep receiving the error message: "The Microsoft.ACE.OLEDB.16.0 provider is not registered on the local machine." I have ...
KEERTI SHARMA's user avatar
0 votes
1 answer
112 views

Why is IEnumerable the recommended datatype for iterable lists when indexing is considerably slower than normal arrays or Lists in C#?

I've only been learning C# for a couple of months now (new job). I ran a crude speed test on some of the looping patterns and something caught my eye. int[] myArr = new int[] { 11, 12, 13, 14, 6, 22, ...
Uchechukwu Ottah's user avatar
0 votes
2 answers
22 views

Is it compulsory to add "F" or "D" at the end while declaring float or double in C#?

Since, we would have already used datatypes "float" and "double" datatypes while defining the datatypes... Why is it necessary to add "F" or "D" at the end? ...
VishwasKalkur's user avatar
0 votes
0 answers
18 views

Why when running yarn start, the css will changed?

Recently, I had changed my css font size from 0.875rem to 1rem. However, after I run the command yarn start for testing, it had changed back the font size to 0.875rem. Any idea how to solve it, else ...
BellBalloon123's user avatar
0 votes
1 answer
69 views

(Visual studio,.net, aws) -Error when publishing to aws lambda

I have the following error: API.Usuario -> C:\Users\Guilherme Campos\Meus Projetos\BlackJack\Back-end\API.Usuario\bin\Release\net6.0\linux-x64\API.Usuario.dll (x86)\dotnet\sdk\6.0.412\Sdks\...
Guilherme C.'s user avatar
0 votes
0 answers
37 views

readerManager.EstablishContext() showing exception - UAE_IDCardLib.dll

I created a dotnet desktop application using c# to read the emirates id card data. ReaderManagement readerManager; PCSCReader reader; try { ...
Ajoe's user avatar
  • 1,455
0 votes
2 answers
40 views

How find Upper Case string is not Equal lower case [duplicate]

How I find string with Upper Case is not Equal with Lower Case for example Me is not Equal with me. length of each string is random string a="Me"; string b="me"; a is not equal b
Sara tabaghchi's user avatar
0 votes
0 answers
8 views

Effecient way to get read mappedmemoryfile as new data arrived using MemoryMappedViewAccessor

I am looking for an efficient way to read mappedmemoryfile using the MemoryMappedViewAccessor create from the CreateViewAccssor method. I really do not want to just use a while(true) loop and exit the ...
steve's user avatar
  • 19
0 votes
1 answer
36 views

c#- Every time a buttton is clicked related item (Button name as Bread) count should be incremented in Data Table row of data grid view

int bread = 0; DataTable dt = new DataTable(); DataRow dr ;` private void Form1_Load(object sender, EventArgs e) { dt.Columns.Add("Food"); dt.Columns.Add("...
Nitu's user avatar
  • 3
0 votes
0 answers
18 views

How get signature form message forms on Netherum

Tell me how to get a message type signature on C# Netherum For regular messages I do this, but it's no different. Here's what I usually use string privateKeyHex = "...
Евгений Агарков's user avatar
0 votes
0 answers
47 views

I want to ignore error alerts in C# DataGridview

I am using C# DatagridView and I am getting this error. Here is log Consulte o final desta mensagem para obter detalhes sobre como chamar a depuração just-in-time (JIT) em vez desta caixa de diálogo. ...
Go Green's user avatar
0 votes
0 answers
29 views

Aspose.words : page break with a background color, what could it be?

I am using the .NET version and I have a problem. I am doing the following things: I have a source document with various styles I merge documents with same or different styles and importing them with ...
LuciferSam's user avatar
0 votes
0 answers
40 views

thumbnail taskbar windows preview X my app topmost

I have an 'issue'... my app is a simple winform C# 4.0 with topmost set as true. It's like a stamp (watermark) always showing the user logged + datetime in the foreground. But when the user passes the ...
pbianchi's user avatar
0 votes
0 answers
11 views

Latency in Write to stream is very high when peer NamedPipeStream(C#) is async

I have NamedPipeServerStream object which is synchronous while the NamedPipeClientStream objects are asynchronous type. In the past when both the sides of the pipe instances where synchronous the ...
user22516534's user avatar
0 votes
1 answer
31 views

refactor lambda expression as sonar showing as null on at least one execution path

I want to refactor this code as Sonarqube showing as 'bidRelations.Where(x => x.Type == _appSettings.ResType).FirstOrDefault()' is null on at least one execution path. public new List<...
Roger's user avatar
  • 11
0 votes
1 answer
42 views

unhandled exception occurred during the execution of the current web request. Value cannot be null. Parameter name: propName

I am trying to build a database management system for legal department of a company using C# and ASP.net and SQL server this is the load record method of the Case.aspx.cs used to load the gridview ...
Ahmed's user avatar
  • 1
0 votes
1 answer
54 views

Storing dictionary of dictionaries using JSON format in Unity/C#?

I am new to Unity and C#, most of my experience is in Python. I need to store some data. For the sake of the discussion, let's imagine it looks like (and no, it does not look like json here, I am ...
Sam's user avatar
  • 147
2 votes
1 answer
34 views

Is there a way to list all rooms in a roomlist with C# Microsoft.Graph library?

I am creating backend service that is supposed to subscribe to Microsoft Graph API and receive notification whenever there is a new meeting scheduled in one of our meeting rooms. I am getting all ...
david sery's user avatar
0 votes
0 answers
9 views

Resource culture location change

How to change location of resource dll from en-US culture folder into other location I need to relocate the location. Changed Satelite to Main assembly UIculture location changed but it only reflected ...
Aziya's user avatar
  • 1
0 votes
2 answers
63 views

Cell Validation fails while dynamically binding the dropdown list to a cell using Aspose C#

I have created an extension method to bind 2 different dropdownlist to specific cells using aspose. First dropdown is working fine but while binding the second dropdown, it throws error as "Excel ...
Asif Iqbal's user avatar
0 votes
0 answers
30 views

We have Upgraded a windows service from. Net4.7.2 framework to. NetCore 6.0, We are encountering issue when we start the service through service.msc

Error Details are as follows: Application:Myservice.exe CoreCLR Version: 6.0.2123.36311 .NET Version: 6.0.21 Description: The process was terminated due to an unhandled exception. Exception Info: ...
Sridhar Reddy Arjula's user avatar
0 votes
1 answer
35 views

Modifying object class while running the code

I have the following code running as it should (albeit not special), but I'm trying to make the number of columns defined to be variable. Ideally, this would be done right here in the class. Is ...
ng80092b's user avatar
  • 647
0 votes
3 answers
75 views

extract data from List<List<T>> in C#

class FieldType { string Id {get; set;} string dataType {get;set;} } class Field { int fId{get;set;} string fName{get;set;} FieldType fType{get;set;} string data; } class ...
Abhishek Kumar's user avatar
0 votes
1 answer
149 views

This C# code creates a 1000 byte memory mapped file and writes 08112003 at position 500

using (MemoryMappedFile mmFile = MemoryMappedFile.CreateNew("Raise", 1000)) { using (MemoryMappedViewAccessor accessor = mmFile.CreateViewAccessor()) { accessor.Write(500, ...
Asive's user avatar
  • 1
0 votes
0 answers
16 views

I have a picturebox which shows the image captured by the camera.I want to send the captured image to the Api serve

I want to send the camera captured image to the API server.For this i convert the image to the byte[]. private void Save_Click(object sender, EventArgs e) { ImageConverter ...
Sachin's user avatar
  • 1
0 votes
3 answers
43 views

evaluated at compile time

What the difference between two examples? example 1: int x = int.MaxValue + 1; // Compile-time error example 2; int x = int.MaxValue; x = x + 1; // no Compile-time error The Author of A Nutshell book ...
Run's user avatar
  • 140
0 votes
0 answers
11 views

How Protected the folder [duplicate]

Without Environment.UserName I want to Protected the folder . My expecting is No one can't able to open the folder . Its always should be Protection. string folderPath = @"C:\ProgramData\...
AKASH ARAVINDHAN A 20507149's user avatar
1 vote
1 answer
26 views

How can I delete exe file written in c# after the task has completed?

here I want to delete the file after the task or execution has completed. The exe is written in c#. Is there anyway to auto-delete or self-destruct mechanism? I tried google searching, but no avail. ...
Sha1co's user avatar
  • 11
0 votes
1 answer
41 views

C# WinForms Panel with AutoScroll has dead space

I have a GroupBox, and inside that GroupBox is a Panel with properties: .AutoSize = false .AutoScroll = true .Dock = Fill .AutoSizeMode = GrowAndShrink I create controls in that (Scroll)Panel at ...
V.Kirsch's user avatar
0 votes
1 answer
72 views

Dropdown item in navbar

<div class="collapse navbar-collapse" id="navbarResponsive"> <ul class="navbar-nav ms-auto py-4 py-lg-0"> <li class="nav-item"><...
EasyPeasy's user avatar
0 votes
0 answers
7 views

Power BI integration in MVC application

How to integrate powreBI tool into MVC application. I have been trying to integrate last one week but not getting steps. How to integrate powreBI tool into MVC application. I have been trying to ...
Rajitha Aleti's user avatar
-1 votes
2 answers
73 views

Part of input string to match with arraylist string

How to matches the string in a sentence with the array list string Input - Machine Name is server1.domain.com ArrayList of string - server1.domain.com, server2.domain.com, server3.domain.com I want to ...
Earth's user avatar
  • 3,499

1
2 3 4 5
517