Converting miles into feet as a program in C#?
How can I write a program that reads an integer number of miles, converts it to an equivalent number of feet, and outputs the result. And as we already know there are 5,280 feet in a mile
View ArticleProgram compiled for any cpu crashes on some test machines and not on...
Hi,I have a strange problem here. I have a simple test program that uses one third party library (video capture device). The libraries are installed on my 64 bit development machine and on another...
View ArticleDisplay 3 images in the view MVC 4 ASP
I try to display 3 images of the current product in my MVC 4 project of web storeI have Domain Model Product which have properties for 3 images:....omitted for code brevity /// <summary> ///...
View ArticleThe name 'ConnectionState' does not exist in the current context
using System; using System.Data.SqlClient; using System.Text; using System.Windows.Forms; namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() {...
View ArticleI want solution for "MSDTC on server 'XXX' is unavailable" without starting...
I am getting exception "MSDTC on server 'XXX' is unavailable. But I want the solution in which I should not start the DTC service in Control Panel. Is there any way to do this?public override int...
View ArticleTransaction scope does not work when two application run at the same time.
I notice in one of my application the when transaction does not roll back. There are 2 application running at the same time. MS DTC service is started1. for the first application(web application...
View ArticleCheck status of MSDTC through c# code or command prompt
I want to check if MS DTC service's status is automatic or manual or disabled. I want to give message to user if MS DTC service is disabled. I don't want to do it with exception handling. Is there any...
View ArticleHow to display “Properties” (of Types/Classes) window?
I have been using 2 kinds of Properties facilities:(1) Properties of a Project/Solution(2) Properties of XAML stuff (Designer)This web page (scroll to the bottom) seems to indicate that there is a way...
View ArticleMulti-User File Access - Modify Part of a File
Hello everyone,In my application, I have a Dictionary<String, int>() object storing some information. The keys in the Dictionary are all unique, and the int value records the number of times the...
View Articleindexer index initialization
I have this piece of coding related to the undexer:/ Use an indexer to create a fail-soft array. using System; class FailSoftArray { int[] a; // reference to underlying array public int Length; //...
View ArticleLoading X-position of Label from DB
Something is not clear for me, if I have winform and on that form add one label. Label is possible to move, form is scroll able.On every move I'm update position of label in database. When again open...
View ArticleDataGridView cell with List as value
Hello everyone,I was wondering how can I display something like this in DataGridView (Windows Forms):public class UserDetails { private string _securityId; private string _firstName; private string...
View ArticleHow to fix "Input string was not in a correct format" error when an empty...
Hi All,I have a method (getMaxID) which reads a SQL table (myTable) and returns a value from it. The SQL table has two columns which are "ID" (Int type and primary key) and "Total" (Int type).The SQL...
View Articlec# Not start automaticlly windows services
Dear Exprt,Need your usual support.Windows services not getting start automatically even service type set to "Automatically"services getting install successfully but not startingSupport@Mytechnet.me
View ArticleUnable to start windows service .
i have built a sample windows service in visual studio pro 2010 , i had succesfully installed it on my windows machine , but when i tried to start it from services panel it says "Error 1053: The...
View ArticleTime to get connection from pool
Pretty straight forward question. How can i get the time for my application to get a connection from the connection pool ? public static OracleConnection GetOracleConnection() { OracleConnection...
View ArticleThree year old code suddenly broke for some servers, and not others
No changes to the code were made, but suddenly File.Exists(path) started returning true even though there was no file there. (and no spaces in the file name.) It appears to be related to changes in...
View ArticlePopulating DataGridView's row from multiple table
Hello all, The first column header is from Contestant table and the succeeding columns are from the Criteria table. Private Sub CreateDataEntry(ByVal CatID As Integer)...
View ArticleStoring a value then clearing a text box.
Hey Guys Im having a little trouble with an assignment. Heres my code that I have so far. This is for the Submit order button. I have it stored in the labels, but once the text fields are cleared the...
View ArticleAccessing elements of Unity (.config) file via XElement
Hi everybody,I'm trying to write a code for getting <register> element from .config file in this...
View Article