|
Here's the code for a view of a tree:
.oo689ou.
98O9PS9689P
S9968D8O886'
`9O89S9889'
``|&|''
|%|
|%|
.:%:. mh
I hope that's useful
*ascii art source[^]
2A
|
|
|
|
|
I feel bad about voting 5 here. It definitely fulfils the treeview part, but isn't c#. This should sort out all the requirements :
{int i=9;}
bool l=true;
{l=l&&l&&l&&l;}
bool k=l||
l||
l||
l||
l||
l&l||l;;
|
|
|
|
|
Your version is certainly better
P.S. Oh, wait, we forgot the database . Back to the drawing board...
2A
|
|
|
|
|
Lyuben Markov wrote: Oh, wait, we forgot the database
|
|
|
|
|
Hi,
last year i develop a software in c#(WPF) so i deployed it and install to the employees machine with the name softbase2011 now my company need the same software but with the new name softbase 2012and just change the graphic interface and the string of the database (because each year they use a new database because they change price and data ,it is a travel agency) but they wish keep and use also the old software (softbase2011) so when i deploy the software softbase2012 i can not install it because appear an error that advice already there is a software with the same name installed on the computer then i ask you how i can install 2 softwares just changing the name on the same computer???
Thanks so much for your attention .
Cheers
|
|
|
|
|
If one is called softbase2011 and the new version softbase2012, then there should be no conflict. You need to investigate where the duplication exists, and correct it.
|
|
|
|
|
hi Richard,
that's strange it says already there is a version installed on the computer but in reality the version installed is softbase2011 so i don't understand why derosn't allow me to install the new version changing the name of the app.
thanks so much for your response
|
|
|
|
|
VisualLive wrote: it says already there is a version installed on the computer but in reality the version installed is softbase2011
Well some element or value that you are using has the same name in both versions so you need to investigate to discover which it is.
|
|
|
|
|
You have to understand how Windows Installer works. Your installer had a ProductCode and UpdateCode that's the same between both versions of your app. That's why your new installer says it's already installed.
Without modifying anything, your only work around is to uninstall the previous version of the app first, then install the new one.
A quick "fix" to get your new installer to work would be to change the ProductCode. The UpgradeCode remains the same and this is going to tell MSIEXEC that the new app upgrades the old one.
|
|
|
|
|
Hello,
I recently began working on a project in C# .Net, written in MS Visual Studio 2010, where many things are at least peculiar...
All files are in root directory, meaning there are no subdirs.
Files include several classes which, in best case, may belong to the same or a similar fact.
Even if there is only one Class in a .cs file, it doesn’t always have the same name, meanig for a Class Car the file may have a name Frm_View.cs, in other words completely irrelevant to the class name.
Hungarian notation is being used, like in the old MS times.
There is an enorm amount of internal, static and both internal static variables and functions.
There is no inheritance between classes.
There are no interfaces.
It seems to me that it is about an old C programm, which has been ported into C#, but only as far as syntax concerns.
What do you think?
|
|
|
|
|
Based on your comments, your program may follow only very few principles of OOPS (if at all).
So I guess you can say its does not follow many OOPS concepts.
But them, I guess its very difficult to write a 'perfect' OOP program in any case though.
|
|
|
|
|
If the application is a C# one, then it's Object Oriented - however, it sounds like it's only just OOP. Perhaps we should coin the term A Little Bit OOP (ALBOOP), as it seems to fit.
|
|
|
|
|
If there are objects (and all C# programs have them) then it is Object Oriented Programming.
nstk wrote: there are no subdirs.
That doesn't matter.
nstk wrote: Class Car the file may have a name Frm_View.cs
That doesn't matter.
nstk wrote: Hungarian notation is being used
That doesn't matter.
nstk wrote: There is an enorm amount of internal, static and both internal static variables
and functions.
That may be a code smell, but it doesn't mean it's not OOP.
nstk wrote: There is no inheritance between classes
That's not always required. Using inheritence simply to use inheritence is a code smell too.
nstk wrote: There are no interfaces.
That doesn't matter.
nstk wrote: It seems to me that it is about an old C programm,
Quite possibly. But you have to judge the existing program on its own merits (if any).
|
|
|
|
|
|
That exactly is my point.
|
|
|
|
|
Thanks for your replies. I am aware that C# an OOP language is. I am also aware that it is not obligatory to have inheritance or interfaces. But in this case everything is against an OOP design. And if every function in a programme can change every variable in it, then imho it has nothing to do with OOP, although in it's syntax there are always classes, since otherwise it wouldn't compile.
I wrote this message because I wanted to get a feedback from the forum, since I plan to write to my boss that this piece of code is worthless and should be rewritten with a new concept. As a matter of fact, we are being confronted with all these problems that are described in the software enginnering literature since years. We always deal with a lot of bugs and problems, no one is completely sure of what is happening, we have not a complete picture of the structure, we are steadily debugging step by step hoping to find out what changed that variable at the last moment(because any class can do that) and even the person who did program it and recently made some changes, had to search for some unexpected new errors that arose.
I think it's time to get rid of that piece of software for the simple reason that it is not as OOP designed. Any objections?
|
|
|
|
|
You can write object oriented code in C, and you can write mostly non-object oriented code in C#. But C is still not an object oriented language, and C# still is. So when you asked "is it OOP?" then what does that even mean?
And also, does it matter? So that program may or may not be "proper OOP design", but are you sure that's a problem? Would it help if it were?
OOP is not a silver bullet that magically solves all problems - indeed it often creates new ones.
If there is a problem with maintainability of the code, then there is a problem with the maintainability of the code. Whether it's object oriented or not doesn't necessarily imply there is a problem with the maintainability of the code, and if both are true at the same time anyway, that does not necessarily make the non-OOP-ness the cause of the problem.
TL;DR: if there is a problem with the code, fix it. If it's not OOP designed but there is no problem, why fix what isn't broken?
|
|
|
|
|
nstk wrote: I wrote this message because I wanted to get a feedback from the forum, since I
plan to write to my boss that this piece of code is worthless and should be
rewritten with a new concept.
Err..no.
You have some code that is unlikely to have an Object Oriented design.
That however doesn't make it "worthless".
If the code is being used in the business then it is far from "worthless".
If it isn't being used then it shouldn't be changed at all.
nstk wrote: We always deal with a lot of bugs and problems, no one is completely sure of
what is happening, we have not a complete picture of the structure, we are
steadily debugging step by step hoping to find out what changed that variable at
the last moment(because any class can do that) and even the person who did
program it and recently made some changes, had to search for some unexpected new
errors that arose.
Now those are problems. And those are problems that OOP will NOT fix.
However there are other practices that if put into place MIGHT fix those problems. Those practices can be applied to a OO and structured app. In certain cases it might be easier to apply them to OO code. But not necessarily.
It might the case that the code is badly implemented and thus it is more cost effective to rewrite it. However based on the problems listed above a rewrite MUST insure that the same problems are not allowed to exist with the rewritten code.
|
|
|
|
|
im developing a application ... that has some softwares which i have to install silentlt back side while installing the other on user selection... im developing using visual studio 2010 .. c# . please any one help
|
|
|
|
|
Why?
That sounds a lot like the kind of installation I really don't want to run...
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
Are you talking about prerequisites such as installing SQL Server Express?
|
|
|
|
|
Here[^] is the standard list of command line operations for an installer. Have a look at the /quiet command mode.
|
|
|
|
|
Here is my code:
//Line below shows an email msg obj with To segment being an array (could have null to x number of receipients/emails):
emailMessage.EmailParamHeaders.To
//Below is creation of mail message obj:
MailMessage m = new MailMessage();
//Line blow is adding each To email address to the "m" object
emailMessage.EmailParamHeaders.To.ToArray().ToList().ForEach(x => m.To.Add(x));
How can I only add the elements of the array "To" where value is not null?
Thank you in advance.
|
|
|
|
|
try this
emailMessage.EmailParamHeaders.To.ToArray().ToList().ForEach(x => {if(m != null) m.To.Add(x);});
|
|
|
|
|
Thank you so much for the answer, that worked with minor change:
emailMessage.EmailParamHeaders.To.ToArray().ToList().ForEach(x => { if (x != null) m.To.Add(x); });
|
|
|
|