Click here to Skip to main content
15,895,462 members
Home / Discussions / C#
   

C#

 
AnswerRe: AzMan Authorization provider and Security problem Pin
R. Giskard Reventlov15-Jun-10 3:58
R. Giskard Reventlov15-Jun-10 3:58 
Questionadd property to Object OR String .... Pin
jojoba201115-Jun-10 2:31
jojoba201115-Jun-10 2:31 
AnswerRe: add property to Object OR String .... Pin
Peace ON15-Jun-10 2:46
Peace ON15-Jun-10 2:46 
QuestionRe: add property to Object OR String .... [modified] Pin
jojoba201115-Jun-10 2:51
jojoba201115-Jun-10 2:51 
AnswerRe: add property to Object OR String .... Pin
Luc Pattyn15-Jun-10 3:03
sitebuilderLuc Pattyn15-Jun-10 3:03 
QuestionRe: add property to Object OR String .... Pin
jojoba201115-Jun-10 3:04
jojoba201115-Jun-10 3:04 
AnswerRe: add property to Object OR String .... Pin
Luc Pattyn15-Jun-10 3:12
sitebuilderLuc Pattyn15-Jun-10 3:12 
AnswerRe: add property to Object OR String .... Pin
Dave Kreskowiak15-Jun-10 5:19
mveDave Kreskowiak15-Jun-10 5:19 
AnswerStop posting the same question. Pin
Pete O'Hanlon15-Jun-10 3:07
mvePete O'Hanlon15-Jun-10 3:07 
AnswerRe: add property to Object OR String .... PinPopular
J4amieC15-Jun-10 3:13
J4amieC15-Jun-10 3:13 
QuestionRe: add property to Object OR String .... Pin
jojoba201115-Jun-10 3:22
jojoba201115-Jun-10 3:22 
AnswerRe: add property to Object OR String .... Pin
DaveyM6915-Jun-10 3:30
professionalDaveyM6915-Jun-10 3:30 
AnswerRe: add property to Object OR String .... Pin
J4amieC15-Jun-10 5:11
J4amieC15-Jun-10 5:11 
QuestionRe: add property to Object OR String .... Pin
jojoba201115-Jun-10 3:48
jojoba201115-Jun-10 3:48 
AnswerRe: add property to Object OR String .... Pin
Pete O'Hanlon15-Jun-10 4:07
mvePete O'Hanlon15-Jun-10 4:07 
AnswerRe: add property to Object OR String .... Pin
DaveyM6915-Jun-10 4:17
professionalDaveyM6915-Jun-10 4:17 
You can create an extension method as has already been suggested but how do you expect to test for empty?
Unless ToString has been overridden to return string.Empty then obj.ToString() will never be empty.
C#
namespace YourNamespace
{
    public static class ExtensionMethods
    {
        public static bool IsNullOrEmpty(this Object obj)
        {
            if (obj == null)
                return true;
            // Do your emtpy magical check here and return a bool indicating the result - I have no idea how!
        }
    }
}

Dave

If this helped, please vote & accept answer!


Binging is like googling, it just feels dirtier. (Pete O'Hanlon)

BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)

QuestionRe: add property to Object OR String .... Pin
jojoba201115-Jun-10 4:26
jojoba201115-Jun-10 4:26 
QuestionActiveDirectory c# - WhoLockMe? Pin
noamtzu0015-Jun-10 2:12
noamtzu0015-Jun-10 2:12 
AnswerRe: ActiveDirectory c# - WhoLockMe? Pin
Dave Kreskowiak15-Jun-10 5:21
mveDave Kreskowiak15-Jun-10 5:21 
Questionusing c++ class dll in c# Pin
kk.tvm15-Jun-10 1:27
kk.tvm15-Jun-10 1:27 
AnswerRe: using c++ class dll in c# Pin
DaveyM6915-Jun-10 1:34
professionalDaveyM6915-Jun-10 1:34 
QuestionHow do I view a jpg without using Image.FromStream Pin
TimSWatson15-Jun-10 0:34
TimSWatson15-Jun-10 0:34 
AnswerRe: How do I view a jpg without using Image.FromStream Pin
Luc Pattyn15-Jun-10 0:44
sitebuilderLuc Pattyn15-Jun-10 0:44 
GeneralRe: How do I view a jpg without using Image.FromStream Pin
TimSWatson15-Jun-10 0:48
TimSWatson15-Jun-10 0:48 
GeneralRe: How do I view a jpg without using Image.FromStream Pin
Luc Pattyn15-Jun-10 1:04
sitebuilderLuc Pattyn15-Jun-10 1:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.