Re: Anyone using structs in C# Business Applications?

2012-08-23 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

Re: Anyone using structs in C# Business Applications?

2012-08-23 Thread Arjang Assadi
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:* Thursday, 23 August 2012 2:13 PM *To:* ozDotNet *Subject:* Re: Anyone using structs in C# Business

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 arjang.ass...@gmail.com 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

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

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 of

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 l...@datarev.com.au wrote: On Fri, Aug 17, 2012 at 10:53 AM, Arjang Assadi arjang.ass...@gmail.commailto: arjang.assadi@gmail.**com arjang.ass...@gmail.com wrote: Hello I have found

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 arjang.ass...@gmail.comwrote: Heinrich, I still don't understand in plain vanilla business app i.e. GUI ( WinForm/WPF/Asp.net

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 l...@datarev.com.aumailto:l...@datarev.com.au wrote: On Fri, Aug 17, 2012 at 10:53 AM, Arjang Assadi arjang.ass...@gmail.commailto:arjang.ass

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 2012

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

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