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.com<mailto:
>>> arjang.assadi@gmail.**com <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 think of anything more fine grind than
>>> that.
>>>
>>> Unless I have been missing something, my question is to Business App
>>> writers, do you use structs any where for any reasons?
>>>
>>> In all the usuall VS demos I have not seen structs being used ( graphics
>>> demos do not count!)
>>>
>>> Regards
>>>
>>> Arjang
>>>
>> Tristan Reeves wrote:
>
>> 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.
>>
>
> Int is a struct?
>
> And yes, I use structs a fair bit for small things. Sure a struct is
> pretty much an class without methods/functions/**whatevertheterminology,
> and maybe a class would be neater/better suited/etc but when I am returning
> a few small things, sometimes I'll hack together something like
>
> struct sResult {
>    public bool valid,
>    public string[] errors,
>    public string[] warnings
> }
>
> Just so I can have certain bits and pieces come back nicely to the UI.
>
> Any reason why this is a bad idea?
> --
> Les Hughes
> l...@datarev.com.au
>
>

Reply via email to