|
Thanks, that did the trick. "none" used to work though, I always used that.
|
|
|
|
|
harold aptroot wrote:
What kind of problems do you expect?
I do not know if i will have a problem. I don't remeber where i read, maybe a dsicusion Class versus Struct. that if you change struct member value, you actualy intilizing new instane of a struct. Does that happen in WinAPI or shoudn't i be worried about that?
Maybe it is my paranoia.
|
|
|
|
|
Saksida Bojan wrote: that if you change struct member value, you actualy intilizing new instane of a struct
That is not what happens. Something related does happen though - structs are often copied because their semantics require it, and then changing a field in the struct only causes the copy to change. That is also why it sometimes isn't even allowed.
|
|
|
|
|
|
Hello All,
I am using itextsharp(Free Version) for generating pdf in multilingual site.
Itextsharp tool generate pdf in English language as well as in arabic language also but as per my requirement i want "Arabic Transpanrent" in arabic langauge so is there any way to support "Arabic Transpanrent" font using itextsharp? and can i add "Arabic Transparent" font in itextsharp tool?
How i can support "Arabic Transpanrent" in itextsharp? or if you know any other tool which is support pdf generation with English as well as Arabic langauge ("Arabic Transpanent Font") then please let me know.
Thanks in advance.
Anish Patel
|
|
|
|
|
I have two services that are in a single solution. Each is a windows service. One is a WCF service with a named pipe endpoint.
The other is a service which will consume the WCF service. I'm doing this in Visual Studio 2010 using all 4.0 framework components.
My question is how do I discover the service? When I add Service Reference and hit Discover it says I have no services in my solution.
I created the service by creating a Windows Service, creating a refernce to my service DLL's, and running the service via ServiceHost.
Should I have created this project a different way?? (followed what was posted on MSDN for doing this)
|
|
|
|
|
|
To anybody thinking of answering this, this was just posted in the Lounge.
To the OP, don't cross post.
|
|
|
|
|
Anyone looking for some extra help on a programming project?
I guess my full potential isn't being used at my current company so I'm have a bit of free time left over and am willing to lend it out.
Drop me a mail if you need some help on something,new or old and i'll try add my 2c.
|
|
|
|
|
hi,
i'm a new user and want to develop a mobile software in C#...
any can help me?
i'll be thankfull
|
|
|
|
|
Read the bit at the top of the page - "HOW TO GET AN ANSWER TO YOUR QUESTION".
Then try again. But this time, try following some of the instructions.
For example:
"hi" is a useless title. Try describing your problem.
ishaq shinwari wrote: i'm a new user and want to develop a mobile software in C#...
Is a useless description of your problem. Where are you stuck? What have you tried?
And so forth.
Go on, think about what you are trying to achieve. Or you will get no help at all - and likely, some abuse.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
How about using a search engine or checking on msdn.
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
Visit the Hindi forum here.
|
|
|
|
|
Hi,
I've built a brand new application written in C# with VS2010 and I'm getting an error with my .rdlc file that states:
The report definition is not valid. Details: The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition' which cannot be upgraded. e:\test\test1\test1\Report1.rdlc test1
This is a local report, not a server based report. I can create different reports against the data base using Report Builder with no issues. Note, I'm NOT trying to transport the files between Report Builder and VS2010. Am I forced into using Report Builder Server reports once I install SQL Server 2008 R2?
I would like to get this work as a local report and I'm not sure what is wrong. Any help is greatly appreciated.
Thank you,
Glenn
|
|
|
|
|
I writing Generic class and i need to restrict the type that that class can get.
I try to write it like this :
public class MyGeneric<t> where T : struct, IComparable, IFormattable, IConvertible, IComparable<t>, IEquatable<t>
{
T total;
public void foo(T val)
{
total +=val;
}
}
But in the foo(...) method - i get an error about the operator '+' can't applied to T.
|
|
|
|
|
int and double are not the only ValueType's, any struct is. They don't have to overload operator + .
Basically, you can't do this in C#
It's a shame really, I often wanted to do something like this and ended up writing huge workarounds.
Maybe in C# 4? I don't know.
|
|
|
|
|
Thanks,
I know about the 'valueType' and the 'struct'.
I'm using .net 4.0 - and i still did not found how to do it here.
I try to define in the 'where' an operator - but it not working.
|
|
|
|
|
How about dynamic , would that work? I haven't done much C# 4 programming so I'm not sure..
|
|
|
|
|
I dont see how 'dynamic' can help me here ( maybe i'm wrong )
|
|
|
|
|
dynamic supports operators and the like, right? So at least you'd be able to do that. What are your exact requirements?
|
|
|
|
|
Yes,
I try the dynamic already as the first solution - its not working as we expected in this case
|
|
|
|
|
Then I'm afraid what you want is impossible..
|
|
|
|
|
public class Foo<T> : IConvertible {
public void bar() {
T t = default(T);
((IConvertible)t) //Check out the intellisense
}
}
|
|
|
|
|
Sorry - this is not working.
|
|
|
|
|
This won't work, at least not in the way you want it... You are writing a numeric algorithm which should work upon different 'arithmetic' types and want to utilize arithmetic operators on T , right? This is not possible. There is no common base type for all 'numerics' which implements the appropriate operators (operators must be defined static on the type which implements them). Each CLR numeric type is implemented as a structure without common base (which is not supported for structures anyway), ergo you cannot restrict a type parameter in a generic to something which does not exists. The numeric types implement various interfaces, but these cannot implement operators since these must be static . So you are stuck, for the moment.
The only clean way (without CLR sourcery) is to define this non-existent common base:
public abstract class NumericBase<T> where T : struct {
public static NumericBase<T> operator + (NumericBase<T> pA, NumericBase<T> pB) {
return pA.Add(pB);
}
public static NumericBase<T> operator - (NumericBase<T> pA, NumericBase<T> pB) {
return pA.Sub(pB);
}
public abstract T Value { get; set; }
public abstract NumericBase<T> Add(NumericBase<T> pOther);
public abstract NumericBase<T> Sub(NumericBase<T> pOther);
}
Specialize for int :
public class NumericInt : NumericBase<int> {
public NumericInt() : this(0) {}
public NumericInt(int pValue) {
Value = pValue;
}
public override int Value { get; set; }
public override NumericBase<int> Add(NumericBase<int> pOther) {
return new NumericInt(Value + pOther.Value);
}
public override NumericBase<int> Sub(NumericBase<int> pOther) {
return new NumericInt(Value - pOther.Value);
}
}
And you can 'Foo ':
public class MySummator<T>
where T : struct {
public NumericBase<T> Result { get; set; }
public void Foo(NumericBase<T> pParameter) {
Result = Result + pParameter;
}
Clearly, you have a lot of overhead with virtual calls, so I would not use it that way in situations where performance is critical. On the other hand, you could use a bit of CLR sourcery here:
1. Write your algorithms using NumericBase<T> . You can run and test them and you are maintaing one generic common code base.
2. For real world usage System.Emit code, which is structurally identical to the generic NumericBase implementation, but uses concrete numeric types i.e. you replace NumericBase<int> with int and so on.
|
|
|
|
|
hi all,
normally in win app. or web app. I can take windows log on username with this code
"System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString();"
but with windows service I can't do this, it takes like this:
"NT AUTHORITY\SYSTEM"
Howcan I do this with windows service??
thanks..
|
|
|
|