.net

How can i get more than one jpg. or txt file from any folder?

Dear Sirs; i have two Application to listen network Stream : Server.cs on the other hand; send file Client.cs. But i want to send more files on a stream from any folder. For example. i have C:/folder whish has got 3 jpg files. My client must run. Also My server.cs get files on stream: Client.cs: private void btn_send2_Click(object sen...

C++/CLI: Compiling static library with /CLR support

We have old (working) code that consists of a static library compiled with /CLR, and a C++/CLI DLL that links to the static lib. We are about to add new features to this static lib. Now, I've have heard from numerous sources that CLR static libraries are not supported by Microsoft, and therefore I'm pushing to clean this up and switch t...

How to marshal the type of "Cstring" in .NET Compact Framework(C#)?

How to marshal the type of "Cstring" in .NET Compact Framework(C#)? DLLname:Test_Cstring.dll(OS is WinCE 5.0),source code: extern "C" __declspec(dllexport) int GetStringLen(CString str) { return str.GetLength(); } I marshal that in .NET Compact Framework(C#),for example: [DllImport("Test_Cstring.dll", EntryPoint = "GetStringLen...

Windows Form - ListView - Removing lines between columns

I need to display a ListView in WinForms which should not have any lines between columns. I tried GridLines=false and also tried setting HeaderStyle to ColumnHeaderStyle.None. But this is not working. I want to remove the 2 vertical lines coming in the middle. ...

Disable AND and OR keywords

In VB.net the ANDALSO and ORELSE keywords should basically always be prefered over the AND and OR keywords. What is the easiest way to disable the AND and OR keywords? I'm thinking FXCop (maybe somebody has already written this rule). Maybe just some setting in VS (we're currently using 2008 and are moving to 2010 end of the summer) I'm...

Factory Method pattern and public constructor

Hi, Im making a factory method that returns new instances of my objects. I would like to prevent anyone using my code from using a public constructor on my objects. Is there any way of doing this? How is this typically accomplished: public abstract class CarFactory { public abstract ICar CreateSUV(); } public class MercedesFactory :...

How can I save the content of an XDocument object as it is without parsing the hexadecimal references to a file

Is there a way to have an XDocument object save its content and keeps the hexadecimal references as they are without parsing them? Thank you for any help. ...

is there a way to estimate the ram needed by a .net mvc application?

Is there a soft to do that? I'm looking for a windows server (I might go for a VPS server), and I would like to know the ram I will need I know I won't need a lot of ram, but beside the "windows task manager", is there a way to really test that? Thanks ...

How to make ConfiguratioManager read a config file other than app.config?

Hi, I need to parse a config file that is situated in another project. I know that ConfigurationManager reads the app.config file by default (right?) how to make it read that particular config file? Thank you ...

What is wrong with ToLowerInvariant()?

I have the following line of code: var connectionString = configItems.Find(item => item.Name.ToLowerInvariant() == "connectionstring"); VS 2010 Code analysis is telling me the following: Warning 7 CA1308 : Microsoft.Globalization : In method ... replace the call to 'string.ToLowerInvariant()' with String.ToUpperInvariant(). Do...

run .dot autonew from href

Hi I have the following to open a word template, problem is it opens the template as read-only without running the autonew and creating the new doc, any idea's? thanks <a href="file:///F|/Online_signup1/DONE-Signup_Step1.dot">Document</a> ...

Silverlight WebApp Calling Webservice in the same solution

Hi, I have a website solution that is composed of a Silverlight Project and an ASP Site that contains an asmx Webservice. The Silverlight project calls various methods in the Webservice, and this works fine on my home PC. When I publish the site (using 123-Reg if that makes a difference), it appears that the Silverlight app is no long...

Software Engineering undergraduate project ideas

There were a similar posts at << Computer science undergraduate project ideas >> << Ideas for Software Engineering Thesis Project >> << Senior computer engineering project ideas ? >> << Final Year Project(Software Engineering) Idea >> So I read all of them and my answer wasn't fit to those. Actually I'm looking for some ideas whi...

Pitfalls when switching to .NET for Windows CE?

I have been developing in .NET for quite some time now, but now I have customer who wants me to develop an application for them in .NET for Windows CE. I have done some embedded system programming in C before, but never in .NET. What tips or tricks would make my life easier when taking this assignment? What pitfalls should I watch ou...

How to pass value when subscribing to event and obtain it when the event is triggered (DynamicMethod usage problems)

The task is to create event handlers in runtime. I need the one method to be called with different parameter value for different events. The events and their number are only known in runtime. So I'm trying to generate dynamic methods, each of which will be assigned to some event, but in general they all just pass some value to an instanc...

C# .NET Application Crashes Immediately After Starting

I was experimenting with the Assembly and File version number. Though my program runs well from the IDE, but after creating a Setup file and installing the application crashes with InvalidDeploymentException. What should I do to resolve the matter? ...

How to pass information from validation summary(strings) to a user control

I have a user control than display approved inputs but i want to intercept invalid inputs recieved in validation summary to pass them to my user control and display in my user control Any ideas? thanks :) ...

IEnumerable<T> and reflection

Background Working in .NET 2.0 Here, reflecting lists in general. I was originally using t.IsAssignableFrom(typeof(IEnumerable)) to detect if a Property I was traversing supported the IEnumerable Interface. (And thus I could cast the object to it safely) However this code was not evaluating to True when the object is a BindingList<T>. ...

extension methods with generics - when does caller need to include type parameters?

Hi, Is there a rule for knowing when one has to pass the generic type parameters in the client code when calling an extension method? So for example in the Program class why can I (a) not pass type parameters for top.AddNode(node), but where as later for the (b) top.AddRelationship line I have to pass them? class Program { stati...

Synchronize a client database with the central database

I need to update existing data or insert new data from client database say DB1 into central database say DB2 both holding same schema and both databases reside in same machine. The updates are not biderectional. I just want changes to be reflected from client(DB1) to server(DB2). The client database(DB1) is nothing but the backup datab...