Category "c++sharp"

Problem with transform.rotation in unity c#

I`ve been doing a game and i got a problem , i tried to do a jumping cube but if you jump a lot the cube can rotate , i tried to restrict rotation by using: //

Why is sqlconnection.open nosing around in my config file?

Today I thought, Oh, I'll just add some SQL logging to a C# SFTP custom (console) program we have. I didn't write it, and it has perhaps an odd configuration fi

How do I make my C# code for Unity in Visual Studio look/work like in the tutorial (picture)

I'm trying to make a mobile game with Playfab and Unity. It's my first time using Unity and Visual Studio. Usually I'm only using VS Code. The code is working

How can I change IsInDesignMode to use it in Microsoft.Toolkit.MVVM?

This time I must be migrate MVVMLight and replace it with Microsoft.Toolkit.MVVM. In the documentation is written there's no direct replacement for IsInDesignMo

How to Secure Cookie in MVC

I have an application in MVC which is consuming some third party APIs. While running application on server I am getting below 4 cookies in browser and one of th

How to translate c# Task to Unity coroutine (OnCollisionEnter2D)

help to translate this code in coroutine. Im making game in unity and need to creat coroutine for it. I try made it, but it doesnt works. private void

Linear search algorithm with generic methods

I have a problem with code. I receive an error CS0311: The type 'object' cannot be used as type parameter 'T' in the generic type or method 'GenericMethods.sear

INT16 - Big Endian (AB) convert to hex and ascii

I want to convert hex and ascii from INT16 - Big Endian (AB) data type. But I don't know how to continue. I want to do similar work in extension. I want to get

How to spawn only one object in Unity AR foundation

I new for Unity and C# can someone help me? I'm creating a kids game and they tend to tap on the screen accidentally and as they look around but then they spawn

Rijndael Encryption/Decryption C# to PHP conversion

I have an encryption decryption class written in C# and i need help writing same algorithm in PHP to obtain same output result, any help finding a reliable solu

How to insert multiple JSON rows into a T-SQL table

I am trying to insert following JSON document into T-SQL: { "GLDETAIL": { "RECORDNO": "264378-1756289-919567--accrual", "BATCH_DATE": "02/01/2

How to make MSTest grab all console output from unit test? Output behind WebHost.CreateDefaultBuilder() goes missing (VS2022, .NET 6, MSTest 2.2.10)

I'm creating an integration test for a Web API, so I'm starting an entire application in a unit test using WebHost.CreateDefaultBuilder() and the usual setup bi

ParquetSharp's UTC adjustment

I am trying to use the ParquetSharp library (https://github.com/G-Research/ParquetSharp) to write some Parquet files from an SQL server database. As the origina

pls HELP ME HELP ME HELP ME HELP ME [closed]

i was making a game in unity and i got this error: Assets\PlayerController.cs(37,21): error CS0120: An object reference is required for the no

C# Encode Bitmap to DDS (DXT1, DXT3, DXT5)

I have a simple Bitmap in my app. I need to save it as DDS (Direct Draw Surface) not like a simple image with .dds extension, but need to encode pixel data and

Github problems with project files

Screen What's wrong with this file? I tried add .obj to gitignore file but that's doesn't helped. Also i don't even changed anything in this file i think that's

In a probuilder object with inverted normals. Collision seems to not work with this one item

I have made my level out of a probuilder object that has inverted normals so the player may exist inside of it. This has caused some issues as for some reason.

Set Row Color Using Epplus

using Epplus how can I set an entire row background color to red? I've got this int rowNumber = ws.Cells[rowIndex].Value; ws.Cells[rowIndex].Style.Fill.Pattern

Debugger does not launch when debugging xUnit tests in C# with VS Code

I am trying to debug some xUnit tests in VS code but I get this error when I try to manually debug the tests one by one (instead of just running dotnet test whi

How can I create a Task that can cancel itself and another Task if needed?

Let's say I have a simple UWP app (so no .NET 5 or C# 8 without workarounds irrelevant to this situation), with many pages that contain buttons, all of which mu