Quantcast
Channel: Visual C# forum
Browsing all 31927 articles
Browse latest View live

Reference a class from a different form?

Hi,I'm trying to build a Windows Forms Application.  I'm connecting to a SQL server using the disconnected access layer method, all the code for interfacing with the database is in its own class...

View Article


Easy Question for experienced programmer!

I'm a newly student of C# and could someone please explain how to think on this question. Thanks!The following program has 3 overloaded methods. Which of the following gives the result 400?a) double...

View Article


kaveh rahimi6

i want receive the data which is read in the program below and process on it and its containing byte and make decision on them.the code is: using System; using System.Text; using LibUsbDotNet; using...

View Article

how to detect collion between the PictureBox and CreateGraphics().DrawImage()

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using...

View Article

Text line order is changed when printed through parallel printer

I made parallel printing module like following.public int PrintText(string parallelport, string receiptText, Int16 nLen, Encoding encoding) { IntPtr ptr = CreateFile(parallelport, GENERIC_WRITE, 0,...

View Article


How to capture winform application crash with screen shot

whenever any runtime error will occur i want capture it with screen shot and mail the error details with screen shot to a specific mail id. anything ready made exist. thanks

View Article

How memory is allocated for string variable

the moment we declare variable like string s=""; then memory is allocated for string ? when later assign something like s="blah blah blah blah blah "; then dynamically more memory is allocated for...

View Article

How to arrange my data in specific way

i have data stored in List<String> and data look like a which stored in list1Q 2014A 2Q 2014A 2012FY 1Q 2013A 2Q 2013A 4Q 2014A 4Q 2013A 2013 FYA 2011FY 3Q 2014A 3Q 2013A 2010FY 2014 FYA i need...

View Article


Getting Error : Invalid anonymous type member declarator. Anonymous type...

I try to left join two list and update first list's one property value with the value from second list's property but getting error Invalid anonymous type member declarator. Anonymous type members must...

View Article


Var implicit type or explicit type is better to work with for performance

i often declare explicit  typed variable like String s="test" or Person p= new Person() etc but i often some people use var instead like var x="test" or var p=new Person();which one is better in terms...

View Article

How to parse a object using System.Json

I have the following code which works fine:using Newtonsoft.Json.Linq; JObject o = JObject.Parse(content);            string b = (string)o["PowerState"];            Console.WriteLine(b);...

View Article

Coding a Hangman game in C#

I'm in my Visual Studio.NET class and we have been tasked to code a game of Hangman in C#. They gave certain instructions to use while loops and utilize arrays and Substrings. However, I'm still...

View Article

Using C# find Clear Case Checked out files

Using C# find Clear Case Checked out files for a particular View. Basically should be able to perform batch file for checking checkoutssaikalyan

View Article


WPF C# issue

I am having an issue with a for each in WPF trying to get it to out put what am i doing wrongForm1.cs namespace boxes { public partial class Form1 : Form { public Form1() { InitializeComponent(); }...

View Article

Async and Wait

A little background. I did programming 20 years ago. I wrote DLLs which mediated the data from a classic ASP page into a database and returned data back to the user. So coding knowledge of new...

View Article


Image may be NSFW.
Clik here to view.

Controls moved on windows form from actual position to another position why

I work on windows form on visual studio 2017 c sharpthe problem that controls as picture pox moved from his position when change resolutionsor when i put on another computer resolution different from...

View Article

kaveh rahimi7

how and where can i define the product ID and vendor ID of my USB port in my code? please tell me with an example.

View Article


C# COM client get TypeLoadException when call C++ COM server function.

I have a question.  I'm developing C# COM client and C++ COM server. I created a function that returns SafeArray with a custom structure declared in C++. When I call this function in C# COM client as...

View Article

Invoke Clear Quest using C#

I have a requirement where we need to invoke the Clear Quest from the C# application with the credentialssaikalyan

View Article

How detect correctly when bluetooth device is disconnected and sub process...

I'm building a project with <g class="gr_ gr_9 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="9" id="9">arduino</g> and <g class="gr_...

View Article
Browsing all 31927 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>