Click here to Skip to main content
15,899,314 members
Home / Discussions / C#
   

C#

 
QuestionWhy convert todouble works diferent in phone and PC emulator Pin
Mees Metsast1-Apr-10 21:28
Mees Metsast1-Apr-10 21:28 
AnswerRe: Why convert todouble works diferent in phone and PC emulator Pin
OriginalGriff1-Apr-10 21:51
mveOriginalGriff1-Apr-10 21:51 
GeneralRe: Why convert todouble works diferent in phone and PC emulator Pin
Mees Metsast2-Apr-10 0:42
Mees Metsast2-Apr-10 0:42 
GeneralRe: Why convert todouble works diferent in phone and PC emulator Pin
Dave Kreskowiak2-Apr-10 2:53
mveDave Kreskowiak2-Apr-10 2:53 
GeneralRe: Why convert todouble works diferent in phone and PC emulator Pin
Mees Metsast2-Apr-10 3:19
Mees Metsast2-Apr-10 3:19 
QuestionDongle License Pin
anishkannan1-Apr-10 20:21
anishkannan1-Apr-10 20:21 
AnswerRe: Dongle License Pin
Eddy Vluggen1-Apr-10 22:40
professionalEddy Vluggen1-Apr-10 22:40 
QuestionIs it OK to return reference from an USING (DIsposable object) Pin
Nadia Monalisa1-Apr-10 18:25
Nadia Monalisa1-Apr-10 18:25 
Hi,

I am wondering if it is ok to use the following snippet ? I am suspecting that, as the object license will be disposed after this block, the caller of GetLicense method will get null object all the time, right ?

public virtual EncryptedLicense GetLicense(LicenseContext context, Assembly assembly, Type type)
    {
        ..........
        using (EncryptedLicense license = LoadLicense(context, null, licenseKey))
        {
            return license;
        }
    }


As my class EncryptedLicense is Disposable, my refactor tool (CodeRush and ReSharper) is asking me to place the statement EncryptedLicense license = LoadLicense(context, null, licenseKey) within using. But, I am getting worried if it is a correct practice or not. Would you please suggest!.
AnswerRe: Is it OK to return reference from an USING (DIsposable object) Pin
Abhinav S1-Apr-10 18:39
Abhinav S1-Apr-10 18:39 
GeneralRe: Is it OK to return reference from an USING (DIsposable object) Pin
Nadia Monalisa1-Apr-10 18:56
Nadia Monalisa1-Apr-10 18:56 
GeneralRe: Is it OK to return reference from an USING (DIsposable object) Pin
Abhinav S1-Apr-10 19:27
Abhinav S1-Apr-10 19:27 
AnswerRe: Is it OK to return reference from an USING (DIsposable object) Pin
Dave Kreskowiak1-Apr-10 18:46
mveDave Kreskowiak1-Apr-10 18:46 
GeneralRe: Is it OK to return reference from an USING (DIsposable object) Pin
Nadia Monalisa1-Apr-10 18:55
Nadia Monalisa1-Apr-10 18:55 
GeneralRe: Is it OK to return reference from an USING (DIsposable object) Pin
Luc Pattyn1-Apr-10 19:01
sitebuilderLuc Pattyn1-Apr-10 19:01 
GeneralRe: Is it OK to return reference from an USING (DIsposable object) Pin
Abhinav S1-Apr-10 19:27
Abhinav S1-Apr-10 19:27 
GeneralRe: Is it OK to return reference from an USING (DIsposable object) Pin
Dave Kreskowiak2-Apr-10 2:47
mveDave Kreskowiak2-Apr-10 2:47 
AnswerRe: Is it OK to return reference from an USING (DIsposable object) Pin
PIEBALDconsult2-Apr-10 3:41
mvePIEBALDconsult2-Apr-10 3:41 
GeneralRe: Is it OK to return reference from an USING (DIsposable object) Pin
Nadia Monalisa2-Apr-10 11:01
Nadia Monalisa2-Apr-10 11:01 
GeneralRe: Is it OK to return reference from an USING (DIsposable object) Pin
PIEBALDconsult2-Apr-10 11:46
mvePIEBALDconsult2-Apr-10 11:46 
QuestionCommand line not working when large Pin
LimitedAtonement1-Apr-10 11:17
LimitedAtonement1-Apr-10 11:17 
AnswerRe: Command line not working when large Pin
Richard MacCutchan1-Apr-10 11:46
mveRichard MacCutchan1-Apr-10 11:46 
GeneralRe: Command line not working when large Pin
LimitedAtonement5-Apr-10 6:03
LimitedAtonement5-Apr-10 6:03 
JokeRe: Command line not working when large Pin
Luc Pattyn1-Apr-10 11:59
sitebuilderLuc Pattyn1-Apr-10 11:59 
GeneralRe: Command line not working when large Pin
LimitedAtonement5-Apr-10 6:00
LimitedAtonement5-Apr-10 6:00 
AnswerRe: Command line not working when large Pin
AspDotNetDev1-Apr-10 15:27
protectorAspDotNetDev1-Apr-10 15:27 

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.