|
i have an windows application in .net 2005
i want get the logged in user name (the current user one who is logged in )
any idea?
thank u
|
|
|
|
|
WindowsIdentity.GetCurrent().Name
only two letters away from being an asset
|
|
|
|
|
I am trying to display columns as rows. The dataset has int and Double types.
I am not sure if this can be best accomplished within SQL Server / C# / .Net
This is what I want to accomplish:
Input:
val1A val2A val3A val4A
val1B val2B val3B val4B
val1C Val2C val3C val4C
Output:
val1A val1B val1C
val2A val2B val2C
val3A val3B val3C
val4A val4B val4C
Thanks for your help!
|
|
|
|
|
Hi,
I'm converting all of the database code in my app, and want to go through every class and every method to ensure that I haven't missed anything. What's a quick way to get a listing of all of my classes/methods?
(I code in VS2003/.net1.1)
Thanks,
cdj
|
|
|
|
|
Miss anything, in what way ? I often would comment out a member variable and compile, if I want to see all the places it is used.
If you want to generate a list, you'd need to write some reflection code, or look for a tool that uses reflection and generates such a list.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Have you tried viewing your class in the Object Browser? It won't give details but will list methods. What are you looking for?
only two letters away from being an asset
|
|
|
|
|
If I can print out the listing, that'll work fine - thanks!
|
|
|
|
|
I see only the option to build in C# . Is there a compile option like C++(ctrl F7) or is that not a concept in C#?
|
|
|
|
|
Save yourself (and us) some fustration and read some books or documentation before using the tool.
Build -> Build Solution or F6 if using the default VS2005 key mappings
only two letters away from being an asset
|
|
|
|
|
What is the difference between compile, and build ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello everyone,
I have a ListView that I wish to run a data search quary on it. I am able to get the raw's information once they are clicked but I was wondering if I can run a query to get the last registered item in the list without clicking on it?
as always, thank you very much for your help and have a great day.
Khoramdin
|
|
|
|
|
Can you tell more exactly what do you need? And make a sample where it will be used. Because it is not clearly understood what do you want.
What is the last registered item ?
One nation - underground
|
|
|
|
|
Hello Saikek,
Thank you for the reply. Your message came few seconds before I lose hope!
I have a ListView which I am registering and displaying some data once a particular button is clicked. Unfortunatly, the data that is going to be displayed in the ListView can be repeative and I am not intrested to register and display the same data once it has been displayed.
That is why I thought if I can run a query to see what has been registed then I can exclude the data that has already been registered and is displayed in the ListView.
Thank you very much for your help and have a great day.
Khoramdin
|
|
|
|
|
You can try the option ListView.FindItemWithText - that finds item with text, or more interestin (like lingvo style) create textbox, listbox and make event on textbox text changing:
private void searchBox_TextChanged(object sender, EventArgs e)
{
ListViewItem foundItem =
textListView.FindItemWithText(searchBox.Text, false, 0, true);
if (foundItem != null)
{
textListView.TopItem = foundItem;
}
}
One nation - underground
|
|
|
|
|
Does C# have the concept of member variables?
I notice that there is no .h file also.
Where would they get defined?
|
|
|
|
|
You mean like this
class MyClass<br />
{<br />
private string MyMember;<br />
}
only two letters away from being an asset
|
|
|
|
|
In C++ in a .h file, i can delclare a variable say 'm_myvar'.
Then i can use m_myvar, globally within the class i.e. (.cpp file).
How does it work in C#. I take it that there are no .h files.
|
|
|
|
|
.h and .cpp files are an artefact of how the C++ compilers worked. There's no reason it's required, I think C# is far nicer in this way.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I see..
so what section of the C# code would i declare the equivalent of a member var in C++. The class is defined like
public class Service1 : System.Web.Services.WebService
{
public Service1
{
}
public Myfunc
{
}
}
where i am assuming Service one method is the constructor and the Myfunc methid is just a public method in the class. So if i were to declare a member var for all my methods in class to have access to, i would create it inside the class but outside the other methods??
|
|
|
|
|
LCI wrote: i would create it inside the class but outside the other methods??
Correct. And, C++ does this:
public:
int i;
int x;
C# does this:
public int i;
public int x;
if you don't provide a modifier, it will assume private.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
Any book in particular that you are recommending?
|
|
|
|
|
Hello everyone !!!
Is there a plugin, that can save the current color settings that is set now in Visual studio.
Beacause of light conditions, and screen of my notebook, i have to change colors of my enviorment. And i wanted to have some settings, so i can choose the different p.
One nation - underground
|
|
|
|
|
You mean like the Import and Export Settings Wizard ?
only two letters away from being an asset
|
|
|
|
|
Yes, now i found that there is such thing . THANKS !!!!!!!!!!!!!!!!!!!!!!!!!
One nation - underground
|
|
|
|