.net

Conversion From XML to PLIST

I have a to convert some 1000 xml files from XML to PLIST format(such as and . Is there already existing tool/application or algorithm available? ...

JSON .NET asmx and Flex3

Hi i wrote webservice in .net which return json string WebService(Namespace = "AndrewRowland")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [ScriptService] public class Service1 : System.Web.Services.WebService { [WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public string HelloWorld() ...

Unused namespace directives can cause any change ?

Hello everybody I am sure that codes will produce same result but CLR will consider unused namespace directives while allocating memory ? Another question can be that CLR consider unused code blocks while allocating memory ? ...

WCF: can't get client endpoint.Address from server

I have to log WCF-service client IP inside IIS-6-hosted WCF service in Intranet Environment. There was a wonderful answer how to do that and it works perfectly for wsHttpBinding interface. But when I use my wsDualHttpBinding interface I retrieve "" (string.Empty) value in endpoint.Address field May be it's not wsDuallHttpBinding problem...

How to run a executable program with different configuration file?

I want to run a program with different configuration file, the program write with C# 2.0, I make some different file name {program_name}.exe.config, I mean one exe with different config file, for example I have 3 config file, then I will run 3 exe with the different config file, bu the exe file is the same one. Can I do not modify the p...

baseAddresses supplied to ServiceHost are not Https

I am trying to configure my WCF Service to be HTTPS. I have configured the behaviors and the services with the relevant addresses but I cannot understand why the address which is supplied to the service host is still http. The behavior I am using is here: <behavior name="RequestProcessorBehavior"> <serviceCredentials> ...

about header columns within listview (C#)

string[] row1 = { "s1", "s2", "s3" }; string[] row2 = { "s1", "s2", "s3" }; ListViewItem item = new ListViewItem("col1"); item.SubItems.AddRange(row1); ListViewItem item1 = new ListViewItem("col2"); item1.SubItems.AddRange(row2); listView1.Items.AddRange(new ListViewItem[] { item, item1 }); listView1.View = View.Details; ....I added s...

getting 'file in use by another process' exception when checking file.exist

hi, i am getting exception 'file in use by another process' for a xml file when checking system.io.file.exist() & then load it.I am using thread.monitor with this code. Earlier when i was directly loading the xml file & not checking its local existence then i ws not getting thsi exception. Can you please let me know, what's the cause ...

How to open savedialogbox in excel from .net windows form

Hi, I have created an application in vb.net from this application i want to open excel file with excel's saveAs option. Is there any way i can do this? thanx ...

PictureBox Drawing Coordinates Relative to Form

I have a PictureBox on a form. In Load event of the form I create graphics as follows: imageGraphics = Graphics.FromImage(PictureBox1.Image) Then, in PictureBox_MouseMove event I draw ellipse: imageGraphics.FillEllipse(New SolidBrush(brushColor), e.X, e.Y, brushWidth, brushWidth) No matter what I try, it always draws on incorrect ...

Visual Studio, Flash & ActiveX pickle

About five years ago I wrote a touch screen kiosk application in Visual Studio 2005 (.net 2.0) with an embedded Flash ActiveX movie in it, which ran a Flash application written in Flash 6. Fast forward back to the present and I've been tasked with upgrading our kiosk platform to allow for video conferencing. This requires communicating ...

Sharing a single resource (serial port) between multiple applications

I need some architectural guidance. Here's my objective. I have a piece of robotic hardware that performs multiple functions (i.e. it has several distinct logical devices). For the sake of illustration, let's say it is a robot arm with interchangeable attachments. The hardware has a single serial port that it uses to connect to a PC, so...

Why are pointers reference types?

This week I've been working on some reflection-based code, and during unit testing found an unexpected condition: pointers are reference types. The C# code typeof(int).MakePointerType().IsClass returns true. I checked in my just-arrived Annotated CLI Standard, and sure enough, pointers are clearly defined as reference types. This was s...

How to Add existing entity as a new Entity with Entity Framework

I want to create a copy my object in my DB with using Entity Framework first I got my "Book" from DB var entity1 = new testEntities(); var book= entity1.Books.First(); entity1.Dispose(); then, I tried to add this object as a new object var entity2 = new testEntities(); book.Id = 0; entity2.SaveChanges(); entity2.Dispose(); Also I ...

Is this the correct approach to poll the database?

Hi, I am creating a WCF service (CALLER) for Azure. The service(CALLER) calls async methods of another third party service(EXTN). The third party service calls the callback methods of another WCF service (LISTNER) hosted by me on Azure. CALLER enter the service details in the databsae with status = PENDING. In the callback service (LIS...

C#: How to programmatically scroll TreeView control?

Have a good day, Please advice how can I scroll a .NET TreeView Control programmatically. It doesn't implemented any public methods to scrolling. Thanks in advance. -- Murat ...

Is LINQ the primary query method of Entity Framework?

I'm just starting with Entity Framework and there's a thing I don't understand: They say LINQ to SQL is being discontinued. But Entity Framework is being activelly developed and recently they released version 4.0. As far as I know, LINQ is the default method of expressing queries in Entity Framework. How come? What are they gonna do? Th...

C# Property Access Optimization

In C# (or VB .NET), does the compiler make attempts to optimize property accesses? For eg., public ViewClass View { get { ... Something is computed here .... } } if (View != null) View.Something = SomethingElse; I would imagine that if the compiler could somehow detect that View remains con...

Telerik RadGrid - How do I set the MaxLength for the Insert Textbox

I have a radGrid on the page with the "Add New Record" button. When I click the "Add New Record" button, a textbox appears above each column that allows me to enter values. I want to limit the number of characters that can be entered in the textbox. How do I set the MaxLength of those textboxes? ...

XML LINQ Select to Object - Using TryParse

I'm using the following code to load a list of objects from XML using LINQ: List<Order> TheList = (from order in XMLResponse.Descendants("Order") select new Order { OrderDate = DateTime.Parse(order.Element("OrderDate").Value) }).ToList<Order>(); I would like to use DateTime.TryParse so that I can use DBNull va...