I have a Listbox with an itemssource set to an ObservableCollection of DataRow. Let's say each DataRow has 5 columns for this example.
In the DataTemplate of the ListBox I have 5 textblocks (1 for each column). My question is how can I bind to an indexer of the row to get the columns value?
Here is my attempt but nothing displays so I ...
Hello,
I am a vb.net programmer switching to C#.
I have the following code for a console application (targeting NET20)
using System;
using System.IO;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
namespace eScoreSwapper
{
class Program
{
private string _dbName = ConfigurationManager.Ap...
if counter % 2 == 1 I am trying to decode this line -its rails project and I am trying to figure out what the % does in this if statement.
...
Hi, I got a C++ struct:
struct Student{
Student(){
}
};
And the enum:
enum studenttype_t { levelA = 0, levelB = 1, levelC = 2 };
Then somewhere else it is declared:
vector<Student *> student;
Could it be used as follows:
student[levelA] = new Student();
If so, what does the student[levelA] m...
I know its almost there, but base is telling me it can't find a column called table1.id when I know its there!
UPDATE table2 SET col1 = (SELECT field1 FROM table1 WHERE table2.id = table1.id) WHERE table1.id = table2.id
...
I am busy with an assignment an I am getting an error from the compiler. I've got 4 yrs C# experience nil in C++.
I'm getting the error "Invalid conversion from nodeType, initializing argument 1 of void linkedListType::deleteNode(const Type&) [with Type = int]' " on the line deleteNode(current->link); of this function:
template<class...
Hi
Why am i getting an "invalid syntax" when i run below code. Python 2.7
from string import *
def countSubStringMatch(target,key):
counter=0
fsi=0 #fsi=find string index
while fsi<len(target):
fsi=dna.find(key,fsi)
if fsi!=-1:
counter+=1
else:
counter=0
fsi=...
Is there a difference between these two declarations? Is one better practice?
NSString* hello = @"HelloWorld";
NSString *hello = @"HelloWorld";
Thanks--
...
Hi All,
I've got this little COCO/R grammar fragment that roughly mimics the syntax of c-style languages for expressions (only vastly simpler). But for some reason, it refuses to parse a compound expression. Perhaps it's been a long week, or perhaps I'm missing something totally obvious. I've boiled the Expression grammar down as much a...
HRESULT SaveGraphFile(IGraphBuilder *pGraph, WCHAR *wszPath)
{
const WCHAR wszStreamName[] = L"ActiveMovieGraph";
HRESULT hr;
IStorage *pStorage = NULL;
// First, create a document file that will hold the GRF file
hr = StgCreateDocfile(
wszPath,
STGM_CREATE │ STGM_TRANSACTED │ STGM_READWRITE │
...
I'm looking for a C# syntax highlighter that will take my C# code and turn it into standalone HTML that is neatly tagged. I have found some websites that offer this but only output HTML that is coupled with a CSS stylesheet. If anyone knows if what I'm describing exists please gimme a link!
...
#include "DLLDefines.h"
#include "DLLDefines.h"
The above actually passed compilation, but why?
...
Is there something like anonymous inner classes (used in Java) in C#?
I explain what I would use it for by example: I'm declaring and initializing field of type IDictionary<Person, Account> and I need to write custom IEqualityComparer<Person>. That is because I want two Persons to be treated as equal by the IDictionary when they have e...
Possible Duplicate:
What is the difference between += and =+?
I know what saying x+=1; means
but what does
saying x=+1; mean?
...
My target module is an executable to be built from X.cpp and Y.cpp, both these two files need a common .h file:
extern HANDLE hPipe;
extern IMediaSample *pSave = NULL;
But when I build the module, I got an error saying :
Y.obj : error LNK2005: "struct IMediaSample * pSave" (?pSave@@3PAUIMediaSample@@A) already defined in X.obj
How ...
In C++, when a method is declared, I've noticed that sometime the method may have an assignement appended to it.
Could anyone tell me what this is?
For example:
virtual void MyMethod () = 0;
What doe the '= 0' mean. :)
Thanks everyone !!!
...
I thought I knew how to declare version numbers for modules. But after reading the article "$VERSION Confusion" at Modern Perl Books, a Modern Perl Blog; I'm now more confused than I started. (Ignorance was indeed bliss.) Not that I have hangups about "perfect" code but I'm just really curious why such a trivial matter apparently has no ...
Possible Duplicate:
What are some example use cases for symbol literals in Scala?
What's the purpose of Symbol and why does it deserve some special literal synatx e. g. 'FooSymbol?
...
new char[1] and new char,essentially the same thing,hm?
...
I see that the UIColor class can call the variable like this [UIColor redColor];
How can I write my class to do the same thing? Also, can I have a method only for class, for example, like this:
[MyClass callingMyMethod];
Thank you.
...