Click here to Skip to main content
15,905,073 members
Home / Discussions / C#
   

C#

 
Generaldouble click on a ListViewItem Pin
amit_833-Mar-08 1:44
amit_833-Mar-08 1:44 
GeneralRe: double click on a ListViewItem Pin
DaveyM693-Mar-08 2:29
professionalDaveyM693-Mar-08 2:29 
AnswerRe: double click on a ListViewItem Pin
mav.northwind3-Mar-08 19:36
mav.northwind3-Mar-08 19:36 
GeneralGet Namespace Name [modified] Pin
DaveyM693-Mar-08 1:30
professionalDaveyM693-Mar-08 1:30 
AnswerRe: Get Namespace Name Pin
TJoe3-Mar-08 2:07
TJoe3-Mar-08 2:07 
GeneralRe: Get Namespace Name Pin
DaveyM693-Mar-08 2:35
professionalDaveyM693-Mar-08 2:35 
GeneralRe: Get Namespace Name - Solved Pin
DaveyM693-Mar-08 3:09
professionalDaveyM693-Mar-08 3:09 
GeneralRe: Get Namespace Name Pin
Pete O'Hanlon3-Mar-08 3:09
mvePete O'Hanlon3-Mar-08 3:09 
You could always do this with the StackFrame. Here's a quick sample:
using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;

namespace TestApp
{
  class Program
  {
    static void Main(string[] args)
    {
      StackFrame sf = new StackFrame();

      Console.WriteLine(sf.GetMethod().DeclaringType.Namespace);
    }
  }
}
GetMethod has a property called DeclaringType which returns the type of the class the method is implemented in, and from there it's trivial to find the namespace.


Deja View - the feeling that you've seen this post before.

My blog | My articles



GeneralRe: Get Namespace Name Pin
DaveyM693-Mar-08 3:21
professionalDaveyM693-Mar-08 3:21 
GeneralRe: Get Namespace Name Pin
Pete O'Hanlon3-Mar-08 3:25
mvePete O'Hanlon3-Mar-08 3:25 
QuestionHow do I display contents of a spreasheet in a listView or datagrid Pin
Walaza3-Mar-08 1:18
Walaza3-Mar-08 1:18 
AnswerRe: How do I display contents of a spreasheet in a listView or datagrid Pin
Ashish Derhgawen3-Mar-08 4:57
Ashish Derhgawen3-Mar-08 4:57 
GeneralRe: How do I display contents of a spreasheet in a listView or datagrid Pin
Walaza3-Mar-08 6:10
Walaza3-Mar-08 6:10 
GeneralUsing a Stored Procedure in C# Pin
Vimalsoft(Pty) Ltd3-Mar-08 1:03
professionalVimalsoft(Pty) Ltd3-Mar-08 1:03 
GeneralRe: Using a Stored Procedure in C# Pin
Obaid ur Rehman3-Mar-08 1:11
Obaid ur Rehman3-Mar-08 1:11 
GeneralRe: Using a Stored Procedure in C# Pin
Vimalsoft(Pty) Ltd3-Mar-08 1:19
professionalVimalsoft(Pty) Ltd3-Mar-08 1:19 
GeneralRe: Using a Stored Procedure in C# Pin
Colin Angus Mackay3-Mar-08 3:06
Colin Angus Mackay3-Mar-08 3:06 
GeneralRe: Using a Stored Procedure in C# Pin
Vimalsoft(Pty) Ltd3-Mar-08 19:14
professionalVimalsoft(Pty) Ltd3-Mar-08 19:14 
GeneralRe: Using a Stored Procedure in C# Pin
mav.northwind3-Mar-08 1:12
mav.northwind3-Mar-08 1:12 
GeneralRe: Using a Stored Procedure in C# Pin
Vimalsoft(Pty) Ltd3-Mar-08 1:54
professionalVimalsoft(Pty) Ltd3-Mar-08 1:54 
GeneralRe: Using a Stored Procedure in C# Pin
Walaza3-Mar-08 1:23
Walaza3-Mar-08 1:23 
GeneralRe: Using a Stored Procedure in C# Pin
Vimalsoft(Pty) Ltd3-Mar-08 1:56
professionalVimalsoft(Pty) Ltd3-Mar-08 1:56 
GeneralRe: Using a Stored Procedure in C# Pin
Walaza3-Mar-08 1:59
Walaza3-Mar-08 1:59 
GeneralRe: Using a Stored Procedure in C# Pin
Vimalsoft(Pty) Ltd3-Mar-08 19:15
professionalVimalsoft(Pty) Ltd3-Mar-08 19:15 
GeneralRe: Using a Stored Procedure in C# Pin
baala.m3-Mar-08 2:28
baala.m3-Mar-08 2:28 

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.