• Register

Recent questions tagged c#

0 votes
1 answer 1 view
asked 3 hours ago miki 180 points
0 votes
1 answer 4 views
Do I need to use C# Windows Application or can I use Console Applications? Do I only need to save the charts on a server?
asked 2 days ago Sofi55 740 points
0 votes
1 answer 4 views
I want to add a "window.location.href = 'http://site.com'" at a particular location in my C# functions so that is gets ignored by the C# compiler but gets passed into the converted Javascript. I could edit the resulting Javascript after it's converted however but that can become cumbersome. Maybe some type of code annotations?
asked 2 days ago Sofi55 740 points
0 votes
1 answer 10 views
I want to know how to trace the count of 1 in the binary representation.
asked 3 days ago Daniel Anderson 2.1k points
0 votes
1 answer 9 views
How can I connect to Db2 databse. My Client has AS/400 iSeries database. I am trying to access the database from c# application.
asked 3 days ago Oscar909 430 points
0 votes
1 answer 7 views
Last couple hours I was breaking head my class which implements IEnumerator and IDisposable cleans itself after passing foreach. During the debugging session I admitted that right after foreach completion Dispose has been called, despite I have not used "using" statement. Is it correct behavior ?
asked 3 days ago alexh 120 points
0 votes
1 answer 8 views
How can i apply any entity framework approach like code first and database first in the ASP.NET MVC application.
asked 4 days ago Daniel Anderson 2.1k points
0 votes
1 answer 6 views
We need to open a page as pop up window in a button click. Can anyone help me here?
asked 4 days ago Daniel Anderson 2.1k points
0 votes
1 answer 8 views
I can search using the full 9 digit ItemID (123456789) but impossible to add searching capability using the last 4 digits of ItemID on top of full digit search? ItemID does not hold fixed number. It should pick last 4 digit from any ItemID number. public ... ", new { @ItemID = ItemID @First_Name = First_Name, }, null, true, 300, CommandType.StoredProcedure).ToList(); return searchItem; }
asked 5 days ago Marivoke 530 points
0 votes
1 answer 4 views
Problem: Hello. I want to create a search for my entry dates and I wrote this line of code. private void History() { int i = 0; dataGridView1.Rows.Clear(); cn.Open(); cm = new SqlCommand("select * from vwStockIn where cast(sdate as date) between @sdate and ... Also, I've tried writing it without having cast(date as date) line and replaced it with just date but that made no difference as well.
asked 6 days ago boris elin 620 points
0 votes
1 answer 6 views
Problem: I have a project in which a server will communicate with multiclient. The program is working fine when severing and clients connect in the same network (same IP address and same port). However, I need to change my server IP address every single time I move to a ... { IPAddress.Parse(ip_address) }; setIP = objMO.InvokeMethod("EnableStatic", newIP, null); } catch (Exception ex) { } } } }
asked 6 days ago boris elin 620 points
0 votes
1 answer 3 views
Problem: Hi, I want to take multiple employee ids in one shot from the user and need to assign them to list .in asp.net, pls help me to sort it out. What I have tried. I have created a text box and tried with validator but it didn't worked out.
asked 6 days ago boris elin 620 points
0 votes
1 answer 4 views
Problem: This is the line of code that causes the problem. This code works but there is a problem. public void LoadProducts() { //this line of code is completely alien to me and it is for to search bar int i = 0; dataGridView2.Rows.Clear(); cn. ... of code in private void frmLookProduct_Load(object sender, EventArgs e) { LoadProducts(); } it gives no problems but won't this cause further problems?
asked 6 days ago boris elin 620 points
0 votes
0 answers 4 views
Problem: I want to encrypt a string in c# and have to send API. what will be best? What I have tried: public class ClsCrypto { private RijndaelManaged myRijndael = new RijndaelManaged(); private int iterations; private byte [] salt; public ClsCrypto(string ... rfc2898 = new Rfc2898DeriveBytes(System.Text.Encoding.UTF8.GetBytes(strPassword), salt, iterations); return rfc2898.GetBytes(128 / 8); } }
asked 6 days ago boris elin 620 points
0 votes
1 answer 2 views
Problem: Hello. I am using visual studio 2019 and doing a project WPF using Telerik UI. I trying to change the cell color of gridview with conditions. please help me. What I have tried: radGridView1.ItemsSource = getdetails_ds.DefaultView; this.radGridView1.Rows[0].Cells[1].Style.ForeColor = System.Drawing.Color.Red;
asked 6 days ago boris elin 620 points
0 votes
1 answer 4 views
Problem: I have user control called UCPlayerAccount in where I have created a "model", an instance of class PersonModel, and populated it with values. Now, in UCPlayerAccount I have a button that loads another user control, let's say it is called UCX, with its own logic for creating some ... { get { return $"{ FirstName } { LastName }"; } } } How to access the "model" in UCX, can anyone help?
asked 6 days ago boris elin 620 points
0 votes
1 answer 4 views
Problem: Using Javascript in C# var txtElecType = $("#txtElecType_" + RowID + ""); txtElecType.css("border", "1px solid red"); var txtElecType = $("#txtElecType_" + RowID + ""); txtElecType.css("border", "1px solid red"); var txtElecType = $("#txtElecType_" + RowID + "" ... ("border", "1px solid red"); var txtElecType = $("#txtElecType_" + RowID + ""); txtElecType.css("border", "1px solid red");
asked 6 days ago boris elin 620 points
0 votes
1 answer 4 views
I'm trying to grasping data types in C. Also, I'm throughly checking a C book and one of the challenges asks what the maximum and minimum number a short can store. Can some one help me to sort out this issue?
asked 6 days ago Daniel Anderson 2.1k points
0 votes
1 answer 4 views
Problem: Thank you for your help! I have a simple list of fruits, inside a list. I created a generic local function. The problem comes when I want to iterate this list. Please check my code and if possible, provide me with a solution. thank you! public class Fruit { public int ... foreach (T thing in list) { Debug.WriteLine(thing.Name); /* LINE CAUSING THE PROBLEM */ } } return Json("done"); } }
asked 6 days ago boris elin 620 points
0 votes
1 answer 4 views
Problem: I get the expected error at line 210. please fix it. using System.Collections; using System.Collections.Generic; using UnityEngine; /// <summary> /// Responsible for moving the player automatically and /// reciving input. /// </summary> [ ... if it exists on a // component attached to this object hit.transform.SendMessage("PlayerTouch", SendMessageOptions.DontRequireReceiver); } } }
asked 6 days ago boris elin 620 points