Re: Anyone using structs in C# Business Applications?

2012-08-22 Thread Arjang Assadi
his thread is talking about programmer >> implemented structs not ones provided by the .Net framework. >> >> ** ** >> >> *From:* ozdotnet-boun...@ozdotnet.com [mailto: >> ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Tristan Reeves >> *Sent:* T

Re: Anyone using structs in C# Business Applications?

2012-08-22 Thread Arjang Assadi
David, Yes, they were clear but for some reason all the sample apps I had seen ( MCV, EF ,Domain Driven etc. ) never had structs used in them, which gave the impression that not unless a high level of customization is desired there was no need for them. Having done biz apps for many years ( in De

Re: Anyone using structs in C# Business Applications?

2012-08-22 Thread Tristan Reeves
PM > *To:* ozDotNet > *Subject:* Re: Anyone using structs in C# Business Applications? > > ** ** > > http://msdn.microsoft.com/en-us/library/system.int32.aspx > > On Wed, Aug 22, 2012 at 7:35 PM, Les Hughes wrote:*** > * > > ** ** > > On Fri, Aug 17,

Re: Anyone using structs in C# Business Applications?

2012-08-22 Thread David Richards
Arjang, Didn't my earlier example demonstrate a benefit in just such a "plain vanilla" application? That's certainly where it has been used. David "If we can hit that bullseye, the rest of the dominoes will fall like a house of cards... checkmate!" -Zapp Brannigan, Futurama On 23 August 201

RE: Anyone using structs in C# Business Applications?

2012-08-22 Thread Troy Schuetrumpf
: Anyone using structs in C# Business Applications? http://msdn.microsoft.com/en-us/library/system.int32.aspx On Wed, Aug 22, 2012 at 7:35 PM, Les Hughes mailto:l...@datarev.com.au>> wrote: On Fri, Aug 17, 2012 at 10:53 AM, Arjang Assadi mailto:arjang.ass...@gmail.com> <mailto:arjang.ass.

Re: Anyone using structs in C# Business Applications?

2012-08-22 Thread Tristan Reeves
Hi, Int, DateTime, bool. They are all structs. Are you saying they are not useful in a vanilla business app? Tristan. On Thu, Aug 23, 2012 at 9:23 AM, Arjang Assadi wrote: > Heinrich, > > I still don't understand in plain vanilla business app i.e. GUI ( > WinForm/WPF/Asp.net ) + Domain/BLL + Rep

Re: Anyone using structs in C# Business Applications?

2012-08-22 Thread Tristan Reeves
http://msdn.microsoft.com/en-us/library/system.int32.aspx On Wed, Aug 22, 2012 at 7:35 PM, Les Hughes wrote: > >> On Fri, Aug 17, 2012 at 10:53 AM, Arjang Assadi >> >> arjang.assadi@gmail.**com >> wrote: >>> Hello >>> >>> I have found myself not needing to use structs for any reason in the >>>

Re: Anyone using structs in C# Business Applications?

2012-08-22 Thread Heinrich Breedt
http://www.codeproject.com/Articles/8612/Structs-in-C http://www.csharp-station.com/Tutorial/CSharp/lesson12 Basically use them when you want to have a "complex value type" semantic. An example could be Address. As with all things in our profession it really depends on your context. One example o

Re: Anyone using structs in C# Business Applications?

2012-08-22 Thread Arjang Assadi
Heinrich, I still don't understand in plain vanilla business app i.e. GUI ( WinForm/WPF/Asp.net ) + Domain/BLL + Repository/DLL etc, where would using structs be beneficial. Of course a simple example using Classes vs Structs just to compare the pros and cons would be great but where in business a

Re: Anyone using structs in C# Business Applications?

2012-08-22 Thread Les Hughes
Heinrich Breedt wrote: http://msdn.microsoft.com/en-us/library/ms229017.aspx -- Heinrich Breedt “Do not wait to strike till the iron is hot; but make it hot by striking.” - William B. Sprague That post just touches on the pros/cons of storing data in the heap/stack with a brief mention in l

Re: Anyone using structs in C# Business Applications?

2012-08-22 Thread Heinrich Breedt
http://msdn.microsoft.com/en-us/library/ms229017.aspx On Wed, Aug 22, 2012 at 7:35 PM, Les Hughes wrote: > >> On Fri, Aug 17, 2012 at 10:53 AM, Arjang Assadi >> >> arjang.assadi@gmail.**com >> wrote: >>> Hello >>> >>> I have found myself not needing to use structs for any reason in the >>> van

Re: Anyone using structs in C# Business Applications?

2012-08-22 Thread Les Hughes
On Fri, Aug 17, 2012 at 10:53 AM, Arjang Assadi mailto:arjang.ass...@gmail.com>> wrote: Hello I have found myself not needing to use structs for any reason in the vanilla business apps ( DB to front end WindosForms,WPF,ASP.net etc) for past 7 years or so. All BO's are classes, and I can't th

Re: Anyone using structs in C# Business Applications?

2012-08-22 Thread Tristan Reeves
Hi, To answer your specific question, int, double, bool, DateTime are all structs. I can't see any (even vanilla) business application getting by without them, can you? Regard, Tristan. On Fri, Aug 17, 2012 at 10:53 AM, Arjang Assadi wrote: > Hello > > I have found myself not needing to use stru

Re: Anyone using structs in C# Business Applications?

2012-08-16 Thread David Richards
Yes, I use them to give a strong type to things like int. For example, if I have an application with Jobs, Locations and Items, they will all have an ID that will most likely be an int. I don't want to accidentally pass a Location ID into a function expecting a Job ID so each has a struct similar

RE: Anyone using structs in C# Business Applications?

2012-08-16 Thread Williams, Thomas
Hi Arjang, my experience sounds close to yours: DB to WinForms/ASP.NET business apps, and no need for structs. Thomas From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Arjang Assadi Sent: Friday, 17 August 2012 10:53 AM To: ozDotNet Subject: Anyone using s