Category "c++sharp"

CS1612: Cannot modify the return value of 'Transform.position' because it is not a variable

Scripts: using UnityEngine; using System.Collections; public class camerafollow : MonoBehaviour { public GameObject target; public float scale = 4f; public Vect

Changing String From Another Model

Is it possible to change a string from another model, basically we have a simple login page which takes the username and then directs you back to the index main

Not getting Confirmation code while trying to confirm emails using Identity methods. ASP.NET Core MVC

When i try to send confirmation email to user and then click provided link, i get current userId but not "code" like token or something, here is the classes: Co

IAnimal Interface implemnted by Dog and Cat and DogViewmodel and catViewModel takes IAnimal dependency. How to inject correct obj cat to CatViewmodel

I was asked the below problem in interview of injecting the correct type in dependency injection. I told i will use factory pattern and check the type before in

Are Unity Rotations & Torque both measured in degrees of rotation per second?

Are Rotations & Torque both measured in degrees of rotation per second? I am trying to match the rotation speed of two objects. One is rotating using torque

MongoDB "IN" filter Issue

I am trying to query mongodb collection using Aggregate and IN Filter, like this var filters = Builders<Model>.Filter.In(x => (Guid)x.Id, listOfIds);

How to set target net7.0 -windows?

I try change <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>WinExe</OutputType> <TargetFramework>net6.0-

Prompt message if Excel column has some value in asp.net c#

I have a criteria where user uploads excel. So in that I want to check if column Is Replacement (Y/N) has values as Y then I want Replacement SAP ID cannot be b

System.Text.Json unable to deserialize doubles properly without being affected by the culture

I have a problem that I checked some time ago and also posted on Microsoft Github since it seemed a bug, I'm speaking of years ago. I was checking if was solved

Return sql command in C#

how should i return this command in c# ? SELECT COUNT(id_pac) AS Expr1, data FROM programare GROUP BY data private void button1_Click(object sender, EventA

C# MongoDB Driver 2.15.0 unable to execute In Query with Linq

I am trying to get my resultset from MongoDB. I need to use In filter here. Here is my code that tries to get data. IMongoCollection<VaersVax> vaersVaxCol

Issue with DependencyProperty binding

I created a small File Browser Control: <UserControl x:Class="Test.UserControls.FileBrowserControl" xmlns="http://schemas.microsoft.com/winfx/2

BlockingCollection with ConcurrentQueue still remain object after GetConsumingEnumerable

I have 2 threads, one is put data to IBlockingColection, and the second read it then send to kafka. My application is asp.net core api. public class ConcurrentQ

How can I handle OnSuspending with WinUI 3

This time I must migrate an UWP App to WinUI 3, so far everything has worked well except for a few small things but the event OnSuspending is simply not trigger

C# linq remove duplicates from the top and bottom of the list and keep the duplicates in the middle

C# linq remove duplicates from the top and bottom of the list and keep the duplicates in the middle For example, var myArray = new[] { 1, 1, 2, 2, 3, 4,

How to find the boundary of close points in .net?

I have many points and I can draw it in a image. there will be many many points . what I want is to find the points is closely. and may be there will be two clo

How to get all children of object recursive with level set to go through?

using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; public class GetChilds : MonoBehaviour { public List<T

How can I try/catch an exception for a negative number in c#?

My program is simply a square root I take an integer from the user in a TextBox and give the result using the function Math.Sqrt in the other TextBox. What I am

Scrape data from div in Windows.Form

I am new in c# programming. I am trying to scrape data from div (I want to display temperature from web page in Forms application). This is my code: private voi

How to retrieve firstordefault from a ToList in linq

I have the following table in sql I am trying to select all records with a status of onboard, but however you can see thatfor user '43d658bc-15a7-4056-809a-5c