|
You don't and can't use a header file in C#.
One of the advantages of using C# over C++ is precisely the fact that it doesn't use header files.
You can only use C++ header files indirectly in C# by referencing a C++ library,
which allows you to access anything declared as public in the header files
that were compiled into it.
|
|
|
|
|
Use the C preprocessor, but the code had better be valid C#.
|
|
|
|
|
I am new to creating WCF projects as well as windows phone 7.
I created a simple method in WCF which just returns a list of an object.
public List<Sticky> GetSticky()
{
return stickys;
}
I then used it very simply
Sticky[] test = client.GetSticky();
When I import the WCF dll via a service reference into a console app the method acts how it should. When I import the method into a Windows Phone 7 application it become an async method (not sure what this means)and doesnt return a list, it comes up void.
client.GetStickyAsync();
If anyone can help explain what is going on and help me to be a little less confused.
Thanks
|
|
|
|
|
Hi all ,
i need a help that i need to import excel to the sql database.
i saw the examples of doing the same, but the thing is that the columns in the excel will get change dynamically. So i want to do as like in SQL import and Export data doing.
It will create the table with respect to the excel (also we have option to choose our own table and map the columns).Like that i need to create the table with respect to the excel every time when i do import . What method should i use, Please help me.
Thanks in advance.
|
|
|
|
|
It seems as though you want the application to be all things to all people which is sure failure.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Do you have SSIS?
If you had to look that up then you probably don't.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Ha! I had to do that last week!
System.Data.IDataReader dr = db1.ExecuteReader
(
"SELECT * FROM [" + args [ 2 ] + "]"
) ;
db2.CreateTable ( args [ 3 ] , dr ) ;
db2.InsertData ( args [ 3 ] , dr ) ;
I'll leave the rest as an exercise.
|
|
|
|
|
Thanks piebald.. i will try this one... thanks and thank you very much for your time..
|
|
|
|
|
This[^] could help you.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
|
|
|
|
|
|
|
I hope i have clearly mentioned that i need to create the table dynamically with respect to the excel structure ?
|
|
|
|
|
Is there an article describing how to keep the client area of the tabControl from resizing when using flat button apperance?
tia
Rafone
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
How can i get the actual time in c#
which will not get change even after we change system clock
*** application /pc were no internet connection
modified on Thursday, December 30, 2010 7:17 AM
|
|
|
|
|
|
thanks a lot for the reply
i am sorry i for got to update that my application don't have an internet connection
|
|
|
|
|
If you don't have internet connection, then you won't have a chance of detecting a changed system time. At least I can't think of any reasonable way. Sorry.
|
|
|
|
|
|
thanks for reply
i hope there should be some way other than using external clock..
coz applications like photoshop and all runs only 30 days ..
even if we change the system time
|
|
|
|
|
Tut, tut, you are trying to break the rules.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
The photoshop will store the latest system date it has run, if you wind back the clock before windows starts, my guess is you get a free copy of photoshop
There are a few things Photoshop possibly does to help with the problem:
- It could "calls home" to get the time off a server as well where an Internet connection is present?
- It might keep track of how long it has been running, to make sure it doesn't exceed the limit (e.g. 30 days continuous execution).
- Some cleverer algorithm, where it keeps track of when it was used, if the current date time is before the latest used date it does something
I know I've fallen foul of point three, when doing some system date specific testing: the software thought I was spoofing the date, so it ended the license immediately.
|
|
|
|
|
They use rather more sophisticated algorithms, and detect such things as the system clock having been wound back; there are things that can be done to check to see that the time is different to what is should be.
|
|
|
|
|
Buy the software, sounds like it will be cheaper.
|
|
|
|
|
Keith Barrow wrote: You could also sync with the clock in a connected GPS system, I think these need to be accurate
Not necessarily, see my post to the lounge (http://www.codeproject.com/Lounge.aspx?msg=3558840[^]) which shows real data proving the inaccurateness of a GPS unit clock.
|
|
|
|
|
Well, if the clock on the PC is wrong and you have no internet connection, its going to be hard to know what the time is. Impossible perhaps. What you do have is Environment.TickCount , which is the number of very small 'ticks' (order of tens of nanoseconds I think) since start up. If you know the time is correct when you start up, you can use this and a bit of maths to keep telling the correct time even if the clock changes.
Regards,
Rob Philpott.
|
|
|
|