|
Seems OK, depends on the usage.
|
|
|
|
|
Read up on static constructors [^]
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I read through it and I can see how that would be useful however "perform a particular action that needs performed once only", I intended those methods to be used more than once and to increase the usability of the code.
So when people see:
Controller.BuildSingleRow(_sheet);
They realise that it constructs the object set to a single row sprite sheet...
It seems ok to me but im sure there is someone out there who would slap me in the face...
|
|
|
|
|
It seems related to the Abstract Factory and Factory Method Design Patterns, but not as complex.
|
|
|
|
|
It is not bad if there is a good reason why the 'constructor' shouldn't actually be a constructor in language terms. For example, if Controller is a pseudo-factory class that can actually build several different final classes in these methods, or the build methods need differentiation by name for clarity.
If this is the only 'BuildXxx' method and it returns an instance of Controller, it should be a constructor (and the class should probably be named with the 'single row' aspect) – after all, that's what a constructor is, a static method that returns a new instance of the class, and people expect to instantiate classes that way.
One small point to bear in mind is that any sort of reflection-based instantiation is not likely to find your static method. You may well not be doing any of that though.
|
|
|
|
|
hi
This is kind of desparate - Is it possible to call Excel XLA function from .NET via Microsoft.Office.Interop?
Many thanks!
dev
|
|
|
|
|
I am creating a window application that need to use sql server database. I want to install this application to client machine without installing sql server or sql express so that my application can still connect to a database on server that i will be providing at client system.
How can i connect to a database(mdf) on client machine through my window application without installing sql server. ? I dont know is it possible or not.
is this software sifficient :
ADONETDataServices_v15_CTP1.exe
|
|
|
|
|
Edit it your message and take the text out of the code block, it doesn't look good.
|
|
|
|
|
Just develop the application as normal, and use the System.Data namepsace which include SQL client classes for working with an existing SQL database. Then all you need to ensure is the relevant version of the .Net framework is installed on the client machine you are installing the application on.
Going by the question, I would take it you are new to all this, and will have some interesting challenges ahead.
Search the articles on CodeProject for SQL and C#.
|
|
|
|
|
As Dave has already answered, develop your application as if it was intended for a local instance of SQL Server, but put your connection string into a app.config file to make it easier to change later. You can test most of the functionality on a local copy of SQL Server Express, then change the connection string before you install it on a client to point to the SQL Server instance located on the network server.
For lack of time, I haven't yet completed the app I've been working on to accomplish much the same. But I have managed to get some major bits working. I've got some code around here that allows the user to browse for SQL Server instances on the network, select one and connect to it. I've also got some unfinished, but mostly working stuff to check for the existence of the target database on the selected server, or create the database if it doesn't yet exist. The pieces all work great, but I haven't got around to integrating them all together into a completed application. It has been extremely challenging, but everything needed is available either here at CodeProject, or on MSDN (via Google). Get started on a client-only version, and when you have it working, post again about this remote connection aspect. Maybe I'll be done with it and be able to send you specifics...
Good luck, learn lots, and have fun!
Will Rogers never met me.
|
|
|
|
|
hello everyone,
I must make an application to send commands from one company to another B transmission. I really do not know where to start so thank you for help.
|
|
|
|
|
vanjier wrote: I really do not know where to start
You could start by explaining what type of commands you want to send and how you wish to send them; telephone, fax, email, sockets, HTML etc.
|
|
|
|
|
Hi,
It is a list of grugs from a grug store to a distributor and I must use the telephon line to cummunicate with the distributor's store modem in order to send the list to him so that he will deliver the goods to the drug store !!
-Excuse my english I dont speak english very well -
thanks
|
|
|
|
|
You will need a program at each end to handle both sending and receiving the data. You will probably need to talk to your distributor in the first instance to see what facilities they have for receiving the lists. If you are writing both parts of the program then you probably need to investigate some of these links[^] for possible code samples.
|
|
|
|
|
^the links you give to me are very helpful thank you very much
|
|
|
|
|
Does your distributor not have an Internet connection? Doing this with an IP level tool is far, far easier than doing direct dial telephony – even something as simple as sending emails to a designated mailbox that you write a cron job to pick up at the other end.
|
|
|
|
|
Hi!
I am very grateful for your answers. at least now I know where to begin. I'll call the distributor for more information on the arrangements for the reception.
thank you very much
|
|
|
|
|
i work in project data from our site to customers
but i need to do something
i don't wan't that data to be send as regaul string
i want it to apperat inside table
i send customers offer price
so i want to be easy to read
some thing like that
Serial ProductName Quantity Price
i want my data to dir in that structure in email sent to customers
md_refay
|
|
|
|
|
|
Well, you could send an HTML format email and build up an html table that way.
|
|
|
|
|
I hope this can be done ease by using the Net::mail function in the perl..
try it out
GDinesh
|
|
|
|
|
Hi,
I have a DateTime object, and my code correctly sets the year/month and day from a DateTime picker controll on my form.
When I return the object and use .ToString, I get the following output:
19/08/2011 00:00:00
Now, I am not using or setting the time, so it is always 00:00:00.
My question is how do I remove this time part from the string?
1) Is there a method from the DateTime object to do this, or,
2) Do I need to do this once I convert to string, and if so how?
Thank you in advance,
Regards,
Stephen
**EDIT Found out. .ToString(format code) **
modified on Friday, August 19, 2011 8:00 AM
|
|
|
|
|
Call
ToString("MM/dd/yyyy")
|
|
|
|
|
loyal ginger wrote: Call
ToString("MM/dd/yyyy")
ToString("dd/MM/yyyy")
is better in his case I think.
V.
|
|
|
|
|
Considering the subject line he probably wants
ToString("yyyy/MM/dd")
|
|
|
|