Click here to Skip to main content
15,913,055 members
Home / Discussions / C#
   

C#

 
QuestionHow can i found which process access my file? Pin
Ambarish Jana25-Mar-08 3:58
Ambarish Jana25-Mar-08 3:58 
AnswerRe: How can i found which process access my file? Pin
Rob Philpott25-Mar-08 5:10
Rob Philpott25-Mar-08 5:10 
GeneralRe: How can i found which process access my file? Pin
Giorgi Dalakishvili25-Mar-08 7:53
mentorGiorgi Dalakishvili25-Mar-08 7:53 
Generalcopy listbox items Pin
NewToAspDotNet25-Mar-08 3:41
NewToAspDotNet25-Mar-08 3:41 
GeneralRe: copy listbox items Pin
Gareth H25-Mar-08 4:16
Gareth H25-Mar-08 4:16 
GeneralRe: copy listbox items Pin
partialdata18-Aug-09 17:31
partialdata18-Aug-09 17:31 
Generalenum problem in C# Pin
salon25-Mar-08 3:13
salon25-Mar-08 3:13 
GeneralRe: enum problem in C# Pin
Russell Jones25-Mar-08 3:48
Russell Jones25-Mar-08 3:48 
I declared this:
public enum HowFullIsGlass<br />
  {<br />
      HalfEmpty,<br />
      HalfFull<br />
  }


and then tried to execute this statement block

HowFullIsGlass hfig ;<br />
if (hfig == null)<br />
{<br />
    Console.WriteLine("Null value");<br />
}

I get this error

Warning 1 The result of the expression is always 'false' since a value of type 'WindowsApplication7.HowFullIsGlass' is never equal to 'null' of type 'WindowsApplication7.HowFullIsGlass?' C:\Users\russell.jones\Documents\Visual Studio 2005\Projects\WindowsApplication7\WindowsApplication7\Form1.cs 26 17 WindowsApplication7

I would be tempted to declare this
public enum HowFullIsGlass<br />
{<br />
    Dunno,<br />
    HalfEmpty,<br />
    HalfFull<br />
}

and declare it as HowFullIsGlass hfig = HowFullIsGlass.Dunno;

then you don't need the null check you can check for Dunno

    <br />
<br />
HTH<br />
<br />
Russ 

GeneralRe: enum problem in C# Pin
Gareth H25-Mar-08 3:59
Gareth H25-Mar-08 3:59 
GeneralRe: enum problem in C# Pin
PIEBALDconsult25-Mar-08 4:48
mvePIEBALDconsult25-Mar-08 4:48 
GeneralRe: enum problem in C# Pin
Gareth H25-Mar-08 4:54
Gareth H25-Mar-08 4:54 
GeneralRe: enum problem in C# Pin
Guffa25-Mar-08 5:11
Guffa25-Mar-08 5:11 
GeneralRe: enum problem in C# Pin
Pete O'Hanlon25-Mar-08 5:14
mvePete O'Hanlon25-Mar-08 5:14 
GeneralRe: enum problem in C# Pin
Gareth H25-Mar-08 5:43
Gareth H25-Mar-08 5:43 
GeneralRe: enum problem in C# Pin
Daniel Grunwald25-Mar-08 18:21
Daniel Grunwald25-Mar-08 18:21 
QuestionHow to Set multiple items as selected in a ListBox with c# [modified] Pin
waldj200025-Mar-08 2:44
waldj200025-Mar-08 2:44 
GeneralRe: How to Set multiple items as selected in a ListBox with c# Pin
Vimal Raj25-Mar-08 3:54
Vimal Raj25-Mar-08 3:54 
GeneralUse Multiple Sitemap file in ASP.NET Problem Pin
SathyaSiva25-Mar-08 2:41
SathyaSiva25-Mar-08 2:41 
GeneralRe: Use Multiple Sitemap file in ASP.NET Problem Pin
Pete O'Hanlon25-Mar-08 3:01
mvePete O'Hanlon25-Mar-08 3:01 
GeneralRe: Use Multiple Sitemap file in ASP.NET Problem Pin
SathyaSiva25-Mar-08 3:09
SathyaSiva25-Mar-08 3:09 
GeneralClient Application Services... Pin
Illegal Operation25-Mar-08 2:34
Illegal Operation25-Mar-08 2:34 
GeneralUse Multiple Sitemap file in ASP.NET Problem Pin
SathyaSiva25-Mar-08 2:30
SathyaSiva25-Mar-08 2:30 
GeneralUse Multiple Sitemap file in ASP.NET Pin
SathyaSiva25-Mar-08 2:28
SathyaSiva25-Mar-08 2:28 
QuestionCom interop -&gt; IUnknown from hWnd Pin
Chris Mierzejewski25-Mar-08 1:55
Chris Mierzejewski25-Mar-08 1:55 
QuestionWhat Process at which port? Pin
ptr2void25-Mar-08 1:07
ptr2void25-Mar-08 1:07 

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.